I had the same issue, with a different version by the past.
If I remember correctly, it’s a problem on windows, with the naming system, on windows it’s not case sensitive, so I had to recreate the project with the correct name I want for the scripts, and past the code in the new file.
Renaming by upperCase or lowerCase is not possible on windows system (donno for 11, I mean for previous version), but godot let you do it, but he can’t save the file correctly, I’m not sure about this last, but godot is Case sensitive so he doesn’t see the problem.
If your problem fits with my comment and you really need to rename your file with only upper or lower case modifications, try update like this: player.gd → Player2.gd → Player.gd (every “->” means that you save the file). But it’s probably a better way to follow the Godot official naming convention.