the heartbeat is a simple packet that doesn’t contain ant IP details whatsoever, however if UDP source ports get modified that might break it.
mind you, the server works fine out of the box on Azure and Scaleway, both of which also use internal IPs with a NAT in front, and Azure also having some security system that doesn’t allow ports by default.