It's a bit hard. You need challenge response (or otherwise limited single use token) + assumption cloudflare will not change the served page/code/add a keylogger.
Just hashing or encrypting the password alone would not help. Since that just transforms the value used for authentication, but attacker only needs to know tranformed value.
What works is FIDO2/passkeys in this scenario. Not with privacy though.