Are you pointing cloudflare directly to Lemmy? I have mine going from cloudflare to Nginx Proxy Manager configured to serve Lemmy.
There is some additional configuration necessary for a reverse proxy in front of Lemmy, which is potentially where things are getting messed up for you?
I don’t doubt that, I’m saying this more because there are additional routes that i had to configure in NPM to get lemmy working properly. This may be where OP is having issues, you can probably set them up in CF too but I have no idea.