This behavior is not new to 1.4. It has been happening since last year when we introduced the API and connected library for plugins to read/write YAML. You are noticing more because you interact with this API every time you use the properties UI.
It is a non-goal of properties update to preserve exactly what you wrote, what matters is that according to YAML the semantic (meaning) is preserved (If it isn’t, open a BR).
Instead of regex, to interact with YAML, you should use a YAML parser.