The AI answer was actually correct. Windows 11 has two different on-screen keyboards. The older legacy On-Screen Keyboard (OSK.exe) and the newer Touch Keyboard.
It should be possible to block osk.exe from running all together.
HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7
EnableDesktopModeAutoPopup REG_DWORD 0
How are you triggering the on-screen keyboard to appear?
Is this a laptop or desktop system?