All users - incorrect location in GA4

Hello
I set up a side tracking server
Then I noticed that all clients from my country are shown as visitors from other countries. Absolutely all

Perhaps this happened when I switched to ** same origin custom domain**: domen.com/metrics
using clouflare

I also noticed in the side tracking server during debugging a new parameter ip_override

Please tell me who knows what to do in this situation?

when I switched back from same origin custom domain domen.com/metrics to Subdomain setup ss.domen.com
the problem is gone
That’s why I think that the problem is in cloudflare (the setting was 1 in 1 according to stape instructions)

Yes, it looks like you are passing in ip_override always the IP address of the Cloudflare server.

Check in incoming requests to sGTM in preview, what ip address do you have in the headers of the incoming request, in ‘X-Forwarded-For’? Is your real IP address there?