Within the scope of a function, the static initializer is all about duration. The variable is initialized only once, at or before the first time the function is called, (and if the code doesn't specify an initialization value, then the variable is initialized with 0, or NULL, or appropriate equivalent. After that, the variable continues to exist for the duration of the program run. The scope of the identifier is limited to the function, but the variable itself continues to exist, so it is valid to return a pointer to it, which would otherwise be illegal. (The "scope of the identifier" is the name of the variable itself. If you have a function named "gimme_a_string" and inside that function you have static char my_str[20], the name my_str only exists inside the function, but the 20-byte array always exists.)
Outside of a function scope ("at file scope"), any variable you declare is already going to have duration the same as a full run of the program. In this context, declaring a variable static affects what is called linkage. If at file scope you declare static int my_flags, the variable name my_flags can not be seen by any other "translation unit". Any other source files in your program, or any library, that tries to get your my_flags by saying extern int my_flags, won't work. Any function in your file can still give a pointer to this variable to any function that calls it, but the variable name isn't visible to any outside code.
THEREFORE: The answer to your question is "No, it is not true that at file scope, declaring a variable as static has the effect of making the variable retain the last-assigned value, as it does in function scope. Any file-scope variable will have that property, declaring it static simply hides the symbol from other translation units."