Geany only automatically determines the filetype when a file is first added to the session. After that it remembers the filetype to allow users to manually set the filetype and have it remembered while the file remains in the session. The session is saved and restored when Geany is quit and restarted.
So to change the filetype, close the file and reopen it, or set it manually `Document->Set Filetype...`