Incognito or private windows are mainly designed to reduce what remains in the browser after the session. They may avoid saving local history and separate cookies, but the website still needs a network connection to you.
Your public IP is a network signal
Unless traffic is routed through another network such as a VPN, Tor or a privacy relay, the destination can generally see the public IP used to reach it.
What private browsing is still good for
Temporary cookies, reduced local history, separated logins and less session persistence can all be useful. The mistake is treating those protections as the same thing as hiding your network identity.