Yes, Windows 11 prioritizes internet connectivity, so automatically switching from your non-internet Hotspot A to the "auto-connect" internet-enabled Hotspot B is expected behavior. This is often due to the Network Connectivity Status Indicator (NCSI) detecting no internet on A.
To diagnose, check the Event Viewer under Microsoft-Windows-WLAN-AutoConfig/Operational for connection/disconnection events.
To prevent the switch, you can uncheck "Connect automatically" for Hotspot B in Windows WiFi settings CooMeet, or try setting Hotspot A as a "Preferred" connection using the netsh wlan command.