This error can be caused by the Logitech G Hub beta software.
The iRacing software can hang on shutdown if the G Hub software is installed and we are attempting to control the LED lights on your keyboard. We are still looking into this on our end, but for now you can go into the sim options and turn off the switch that lets us control LED backlights on your devices. That should stop the hang from happening.
Alternatively you can just bring up the task manager and kill off iRacingSim64DX11.exe. The hang happens after we save out any settings changes so it should not affect anything.
Or you can roll back to the more stable LGS 9.x software.