Hi @CJ ,
This is called Dynamic lock, please refer to lock-your-windows-pc-automatically-when-you-step-away-from-it for how to disable it.
Another option is to use the PowerToys Awake utility, which also prevents the PC from sleeping.
Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.