For a redirect, you need a proxied DNS record. But to play Minecraft, you need a DNS-Only record.
To bypass this problem, you need to use an SRV record to make Minecraft use dns-only.example.com, even though people still enter proxied.example.com to join your server.
Then you can create redirects for the proxied record.
There are many tutorials on how to create SRV records for Minecraft on the internet, so I won’t go into more detail here. Just ask if you need more help.