GUI automation with python

Next, I want to start a project to create a bot for a specific Android game in Python, so I use an emulator, nox. My idea is to be able to work with the automation part of the graphical user interface (automatic clicks, press a button on the keyboard, etc.) in the background, in this case, which could leave the window minimized and perform other tasks .

The library I found for python gui automation was PyAutoGUI, but you can only click on the full window if the pixels currently appear on the screen, which will not happen if the process is minimized.

Is there any way to do this process with the minimized window?