Try using the settings menu instead. Settings > autostart > add login script.
I was playing around with adding script in the directory when another user asked here on the forum a while back, and I found it to be unreliable to say the least.
IIRC we figured out using the gui to add the scirpt made it work all the time.
But I have used settings menu, of course!
The strange thing is that other autostart scripts works, but this one don’t.
Maybe because I use an appimage? But why, then, from a terminal and from KDE menu I can start the script?
I have never used that. Do they work like snaps? Create a bunch of loops?
If so, it could be that the loop is not setup yet when the login script is initialized.