Redirect Rules can only work with proxied records so the requests go to Cloudflare first.
The redirect from @ to www can be done on Cloudflare by changing the DNS record from the CNAME to proxied AAAA 100::. The www redirect from http->https will need to be done on Google as that www record will need to stay as “DNS only”.
@sjr is right. For your redirect rule to work on your www subdomain, it has to be proxied.
You can read more information in our official documentation: Proxy Status.