STM32F7 USB SOF and ID Disable/Reuse

I am trying to use the USBSerial class on an STM32F767VI and it works fine. I also have CAN3 RX setup on pin PA8 (USB SOF) and a GPIO on PA10 (USB ID). I am not using the SOF or ID functionality, but initializing the USB makes it so those pins don’t do anything else. I tried setting “target.usb_speed” to “USE_USB_NO_OTG”, because I am under the impression that SOF and ID are mostly related to OTG, and this is device only, but then I get a whole raft of other compile errors. I also tried using STM32Cube to make my own drivers where the USB is initialized as being device only and it compiles, but changes nothing. Is there any way in the current USB implementation that I can actually use the SOF and ID pins?