"Unsaved changes" when opening file, GUI becomes jumbled
I'm currently working in a major project (WinForm/C# in Visual Studio) where a few files, when opened, will immediately get the unsaved changes asterisk on them. If I save these changes the .cs- and .resx-files gets edited with changes mainly to the numeric values associated with the graphical elements in ways that everything in the GUI gets jumbled and unusable (panels become smaller than their contents, need to manually resize window to reach buttons etc).
If I open the files and and "undo" all the changes and save the file the exact same changes are made to the .resx-file (but the .cs-file is unchanged).
I've tried using Visual Studio 2019 and 2015 but there was no difference. I've been trying to get to the bottom of this issue for hours and have made no progress. What is causing this? Where are these unwanted changes comming from? They seem to be stemming from auto-generated code by the designer but I don't know how to stop this.