May I ask in this particular case, your sub-domain is proxied ( cloud)?
And did you used any of the Cloudflare Page Rules to achieve that?
Useful information about them:
Configuring URL forwarding or redirects with Cloudflare Page Rules
Understanding and Configuring Cloudflare Page Rules (Page Rules Tutorial)
Helpful tutorials: