Hello,
Your application may require a GUI session.
To avoid this, you can establish two sessions: Log into PC B from your desktop, then from PC B, access PC A. Afterward, disconnect the session on your desktop. Essentially, you need a jump PC, which is effective in most cases.
If the Answer is helpful, please click "Accept Answer" and upvote it.