Hello,
We don't need a logon session if we want to use a shared printer. You can use this document as a reference
If it doesn't work for you. You can consider use a printer server: https://learn.microsoft.com/en-us/troubleshoot/windows-server/printing/install-configure-file-print-server
If the Answer is helpful, please click "Accept Answer" and upvote it.