Okay I got a tip from r/cloudflare that if you enable Strict SSL, it would work. And it did. No idea why, but posting here if someone has the same problem.