Hey, I know it’s a bit late, but I was getting the same issue and tried just about everything (I’m working on a game with a dedicated server) it wasn’t working in the editor because I didn’t have the dedicated server option ticked in the play settings.
Maybe this will help someone who comes to this post later.