So how can I set two servers to use the same domain? I've been using cloudflare tunnels to link ports from my server to subdomains
You don't. You point them to the same IP, and then there is a reverse proxy there. But why would you have two servers? You seem to over complicate this. Do you even have a product?