3rd party game controllers not working

I have a USB game controller (not XBox) that works for games on Steam, like Rocket League on my Windows 10 desktop PC.

However, when I run Forza 7, I am unable to use the game controller. If I unplug the controller from my computer while FM7 is running, I get a pop up message saying that the controller has been disconnected, meaning that the game detects the controller, but for some reason, does not read my inputs from the controller.

Does anyone have a fix for this?

Thanks.