Keyboard and mouse randomly stop working when using controller

I am having some issues when trying to use both my keyboard and mouse and controller to play.

My controller is an xbox controller and it is connected via a bluetooth wireless dongle.

My keyboard is a logitech G910.

The controller works fine however, when I want to switch to mouse and keyboard to type a message it does not register the keyboard/mouse input.

I have found some previous threads wherein people suggested turning off the In-Game overlay in Nvidia GeForce experience however this did not resolve my issue. I have also restarted my computer several times, I have completely uninstalled GeForce Experience, I have also tried uninstalling and reinstalling the drivers for my keyboard.

This is incredibly frustrating. Does anybody know of a fix?

Thank you and happy gaming.