I'm using freeopcua too and server.stop() indeed tends to go wrong. in the examples
I think in the examples it's the embed causing the issues. It's the embed that is causing this. I don't know why they added it or yes... I do know to keep the server running as otherwise the python script would end.
I myself do this by waiting for user input on server side if the user enters then the server will stop
server.start()
input("enter to stop...\n")
server.stop()
this is on my server side It's not the cleanest way but for certain the embed is what's causing the issue for you guys too. And there are many potential solutions to this keep the server running without the embed() function