I've got two Path of Exile windows open, Steam and Standard

I want to use the PS5 Controller on the Steam version and my mouse and keyboard on the Standard version.

But if the Steam version becomes inactive it stops reacting to the joypad.

Is there a way to make this work?