In my workplace we mostly communicate through mail and Teams, and I block notifications out of work hours.
It works wonders in terms of not thinking about work outside of work.
I know that not everyone are as fortunate as me to be able to do such a thing, which is why legislation is most welcome.
Got the same setup, but I connect to my server with vscode through SSH and edit files there.
Much more user friendly as a primary Windows guy.