CNAME redirecting www to non-www redirects to http instead of https

Have you tried adding the desired redirect as a rule in your Cloudflare configuration?