How does the Android version of Opera determine your location?

I’m using the latest Android version of Opera (version 83.4.4388.80820), and my phone is always connected to a VPN (not Opera’s VPN) in a different country (‘country B’) from where I actually am (‘country A’).

Whenever I use the default Google search engine in that browser, despite having already connected to a VPN in country B, Opera, somehow, always knows I’m actually in country A, and the Web address of the search‑result page shows the domain of ‘www.google.com.[country A, where I actually am]’, not ’www.google.com.[country B, the VPN country]’ or ‘www.google.com’. Even after I’ve enabled flight mode (so no mobile signal from where I actually am) and manually changed my ’phone’s time zone to the VPN country’s time zone, when I’m connected to the Internet via Wi‑Fi and my VPN, Opera is still using the Google search engine of where I actually am, instead of the Google search engine of my VPN country.

The weird thing is, if I scroll down to the bottom of the search‑result page, the VPN country’s name is shown as the version of Google I’m browsing, and the VPN server’s location is shown as my IP‑address location, indicating that Google’s Web site doesn’t know my real location.

How does that default Google search engine work out my real location when Google’s Web site can’t?

There is an option called “Bypass VPN for search” in the VPN settings of Opera Android, and it enabled by default to give you search results related to your location

I want search results related to my VPN country, not my actual location.