Basically the same problem as C_B (USB Tethering cannot connect (can still ping device)), my 7 Pro is also running KOSP (Android 12 custom rom). My device is rooted (Magisk).
Kosp Android 12
OnePlus 7 Pro
Windows 10/11/Hackintosh MacOS Monterey 12.3
Please let me know if anything else needs to be provided, thanks.