Hello Manny,
the main issue will be that during the Sleep (wait) periods the screensaverwill turn on, and then the next SendKeys will be cut (first key sent will be spent to remove the scrensaver).
You can have a $wshell.SendKeys("{NUMLOCK}") to remove first the screensaver after the Sleep(wait) period. The {NUMLOCK} will produce key activity but will not affect anything screen in case the screensaver is not on for any reason.
On the other hand, may be worth considering removing the screensaver using GPO for that or those machines, and replace by "Turn off screen after X inactivity"
Disable ScreenSaver GPO: User Configuration > Administrative Templates > Control Panel > Personalization > Enable Screen Saver (setto Disabled)
Set Turn Off Screen in power plan: Computer Configuration -> Administrative Templates -> System -> Power Management -> Video and Display Settings -> Turn Off the Display (Plugged In) (Set Enabled)
--If the reply is helpful, please Upvote and Accept as answer--