There's so much research that shows the opposite.
You might prefer that but government websites need to work for everyone, and showing validation messages automatically confuses less technically able people, and it's really hard to make it fully accessible.
At which point do you announce the mistake to a screen reader? Where do you shift focus? etc.
It was designed this way for a specific reason. Services that feel the need to extend or change it do have the option to though.