Hello,
In my case, I had to check every parameter of Network Connectivity Status Indicator(NCIS) in the registry.
I found, somehow, the values of the two DWORDs are set to "1" which are expected to be "0"
DWORDs:
DisablePassivePolling
NoActive Probe
Both must be set to "0".
After correcting these settings restart related services and reconnect to the WiFi. Or simply, restart your computer. Once the internet is detected there may be disconnect several times. It is quite normal since all background services detect the Internet and configure their parameters which may cause disconnections.
My solution is valid for Windows 10 1607 and above. Lastly tested on Windows 11 24H2.
Regards