For that you would have to remove crossrealm play. If you do that... well you will destroy crossrealm communities and prevent friends from playing together also effectively reducing player pool to choose from meaning people will move into full servers where you won't care again because there is like 30k Horde in Kazzak.
I mean unless you are doing solo content, you could be locked to your realm, but as soon as you are in search for M+ or some rare kill/pvp group you will be out in some other realm most likely or bring random people to your realm.
Again, City vs a Village mate. As soon as they opened the world for us, it is not possible to take that away. Stories like yours happened to many. I used to duel outside of OG all the time. The thing is everyone has their goals now and want to make them and we use other people to get there, even in classic, community is mostly the same, just old game mechanics are still forcing it but it's rules which everyone signed up for, when they joined classic. Can't make any significant changes to retail and not break something.