User-defined format for numbers being lost

I am trying to have time formats saved as H:MM A/P, but every time I save the file the next time I open it the format has switched to H:MM AM/PM. This normally would not be an issue but I have limited space and need to have a short cell width. Is there a way to save it as the first format?

No. Use H:MM instead, which displays in 24h format and takes even less space.