How can I prevent InDesign from overriding my prime signs (ie, “minutes” Unicode 0027) with apostrophes (Unicode 0313); and likewise the doubled forms?
Primes are required for describing latitude and longitude, for instance, S28°23ʹ; E151°42ʹ.
However often I put them in, after I have saved they have turned into apostrophes when I reopen the document.
Is there a way to set up a character style or any other way to prevent this override?
If the codes you write in the question are accurate, then that’s your problem right there: the Unicode character U+0027 is not a prime. It’s a simple, typewriter apostrophe, and the setting mentioned in Wolff’s answer is likely responsible for them being changed into curly apostrophes.
The correct code for a prime is U+2032; this character is never interpreted as an apostrophe or quote mark and never changes, regardless of what you have your Use Typographer’s Quotes setting set to.
Note that U+0313, which you mention as being an apostrophe, is also a different character: it’s the Combining Comma Above, which is used, among other things, to indicate smooth breathing in Ancient Greek. Crucially, U+0313 is a combining diacritic, meaning that, unlike apostrophes and letters, it doesn’t take up any space on its own, but is instead placed above another character without (usually) affecting the width of the base letter.