Hello Dilusha Munasinghe,
You can try to run the commands in the similar thread.
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /f /v ScreenSaverIsSecure /t REG_SZ /d 0
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /f /v ScreenSaveActive /t REG_SZ /d 0
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /f /v SCRNSAVE.EXE /t REG_SZ /d C:\Windows\System32\scrnsavex.scr
Note: For the third command, setting the value of this item to a dummy "screensaver" program effectively disabled the screensaver. It might be enough to set the item to a null/empty value.
Please run the commands in similar test lab forstly, then if it works, you can disable screen saver in production environment.
For more information, please check the information in the similar thread.
https://superuser.com/questions/1768893/windows-11-modify-screensaver-behavior-via-script
If you have any question or concern, please feel free to let us know.
Best Regards,
Daisy Zhou