If you’re using EOS, you should not be connecting by IP, it doesn’t handle NAT traversal that way.
It’s the same with Steam. If you use the Steam Online Subsystem, create a session (lobby), and connect to that, it will guarantee connection. If you’re joining by IP, you’re on your own (although with Steam, I dont think you can join to IP anyways)