I'm using PAD on a VM, and when I start the RPA and minimize the VM screen to work on my local machine, the Keyboard activities - send keyboard function doesn't work.

I'm using PAD on a VM, and when I start the RPA and minimize the VM screen to work on my local machine, the Keyboard activities - send keyboard function doesn't work.
I assume by the "VM screen", you mean you have a Remote Desktop connection to the VM?
It will not work when you minimize it. That is because that's the way Remote Desktop works. It uses the hardware of your local machine for the screen. When you minimize it, the screen of the VM turns "black" and Power Automate Desktop will not actually see it, nor will it be able to interact with any UI elements there.
If you want to run something on a VM in attended mode, while at the same time you work with your own machine, you should use a less intrusive way of connecting to the VM. Use software, such as TeamViewer or AnyDesk, or similar. These do not create a new session on the VM, and do not use your own local hardware to create a screen view for you. So, you can easily minimize or even close the session without interrupting your flow.
Please be aware of the fact the software I suggested above is paid. I have no affiliation with any of them, but I use both to provide remote development and support to my clients.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.