STMCubeMX 5.3.0 USB mouse code not working

I have custom board with a STM32F446 processor I am trying to test
using cubeMX (v5.3.0) generated code for a USB human interface (mouse).
Unfortunately, I have had very sporadic results with getting the computer
to recognize it as a USB mouse. The computer shows it connecting, then
disconnecting, rarely but sometimes recognizing it as a mouse only to disconnect a minute later. Micro is running at 168Mhz. with heap size set to 1000.
I have replaced the USB connector on the board, the cpu and the crystal. Confirmed the same USB cable I am testing with works perfectly with other devices.
Could someone confirm the code generated by the cubeMX as a OTG USB device, human interface still produces working code for a USB mouse?
