Same exact problem for me, with both Dirt Rally and Dirt 4.
My configuration: overclocked (3800 MHz) Ryzen 5 1600, Sapphire RX580 Special Edition, 16 GB 3200 MHz RAM.
Happened with my old wheel, Logitech Momo Racing, and with my new one too, Logitech G920.
Happened with my old motherboard, an MSI X370 Gaming Carbon, and with my new one too, Asus Rog Strix X470-F Gaming.
I was shocked to found the exact damn annoying bug 2 years later, with another wheel, another motherboard, another game, and the internet full of complains, questions and sadly useless answers.
Just got a refund for Dirt 4.
Codemasters please wake up.
Have a look into this, and hire this guy lol: https://github.com/simonowen/dirtfix