It seems pen stopped working properly for fullscreen application in gnome 46. Someone posted the issue here Input devise disabled on fullscreen windows after Gnome 46 update - Kernel, boot, graphics & hardware - EndeavourOS
I can confirm same on my fedora + gnome system.
This has already been fixed, but there is no release with the fix yet: Pen input crippled in maximised/fullscreen apps (#3616) · Issues · GNOME / mutter · GitLab