Hi,
If you need lock the Windows and auto Sign-out, it's not possible.
However, if you want to log out of Windows and log in again, you can try using the shared computer activation method:
https://learn.microsoft.com/en-us/deployoffice/overview-shared-computer-activation
Just checking in to see if the information was helpful. Please let us know if you would like further assistance.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.