Fresh Matomo & Cloudflare CDN can't login

Hello,
I’m using Cloudflare CDN with my website. Yesterday I setup a new subdomain and installed Matomo 3.14.1 on Debian Buster with Apache2 and PHP 7.3. I added the subdomain DNS A-record to Cloudflare DNS and generated a SSL-Cert.

The installation was running fine. After installing I can access the subdomain and see the Mattomo Login page. When I try to login I get the error message:

Fehler : Sicherheitschecks fehlgeschlagen. Bitte laden Sie das Formular erneut und prüfen Sie, ob Ihr Browser Cookies zulässt. Wenn Sie einen Proxy Server verwenden, müssen Sie Matomo so einrichten, dass es Proxy Header akzeptiert.

Error: Security checks failed. Please reload the form and check if your browser allows cookies. If you use a proxy server, you have to set up Matomo to accept proxy headers.

I checked my config.ini.php what was generated after installation includes:

[General]
proxy_client_headers[] = "HTTP_CF_CONNECTING_IP"
proxy_client_headers[] = "HTTP_X_FORWARDED_FOR"

So I followed the guide on the link and modified my config.ini.php and tested every possible configuration which is mentioned on the website:

Firt I tried:

[General]
assume_secure_protocol = 1
; Uncomment line below if you use CloudFlare
proxy_client_headers[] = HTTP_CF_CONNECTING_IP

Then I tried:

[General]
assume_secure_protocol = 1
; Uncomment line below if you use a standard proxy
proxy_client_headers[] = "HTTP_CF_CONNECTING_IP"
proxy_client_headers[] = "HTTP_X_FORWARDED_FOR"

Then I tried:

[General]
assume_secure_protocol = 1
; Uncomment line below if you use another proxy (that sets Client-IP header)
proxy_client_headers[] = HTTP_CLIENT_IP

I also googelt and tried different other configurations from the forum. I everytime cleared my browser cache and cookies before testing the login again. But no matter what I do I can’t login to Matomo.
I have not installed mod_matomo on apache2, because I can’t install on Debian Buster.

So after everything failed I deleted the database and all Matomo files and tried to reinstall 3 times. I also installed Matomo 4.0.0-b3 but I still can’t login and get the same error message.

I found this guide for installing the javascript code to Clouflare CND:

But I have not tested it yet, because I am not able to login Matomo.
I appreciate your help because I really want to get this running.