How about a Mouse Mover application which can run on Macintosh running on Intel or Apple's latest M1 Macs. The Software presented here can keep the mouse cursor moving for pre-configured duration. Yes there are other configurable options available for controlling as to how and when the automated Mouse Cursor Movements are done on your Macintosh. You would need to allow accessibility access permission to this application named as Auto Mouse Mover by MurGaa.com for Macintosh on your Mac to perform automated Mouse Cursor Movements.
Download the Mouse Mover application and run it on Intel or M1 Mac. The download link provided contains two applications (1 for Intel Macintosh and another for Apple's M1 Macintosh) and depending on architecture of your Mac, appropriate application is run automatically. Once free trial expires, you can Pay USD 6.54 and Unlock Trial of the Software on 1 Macintosh Computer for Usage of the Software Upto 3 Months from the Date of Payment of Activation Fees.
The Software download presented here is similar to that described in the post Keep Mouse Moving which presented a windows based software. The download file presented in first paragraph is a .zip file containing an Application containing a Macintosh Application which can be run on Intel or M1 based Macintosh Computers. All you need to keep your Macintosh active and let the mouse cursor move automatically, is to extract the contents of the zip file to a folder on your operating system.