Sometimes when saving the template in UIBuilder a pop-up window appears with text “File was changed in external editor”, then UIBuilder just drops all the changes since last successful save. This issue appears randomly, but often. I’ve double checked that template and USS files are not opened anywhere outside unity.
If you can find specific repro steps, can you file a bug with Help → Report a bug? That will help tracking it and prepare backports once a fix lands in the latest version.
I tried to reproduce it but it seems to appear randomly - nothing specific triggers this behavior. But if I’ll be able to reproduce it - I will report it, sure