CI job stucks forever

Hello. I have a problem: CI job stucks forever on the windows pwsh runner (working as a service). If I directly login to the runner’s machine using the same credentials as for CI job, then the same job script is executed without any problems. Can anyone suggest what can be the reason for such difference?