Hi,
Please find some samples in the below FAQ:
https://forums.developer.nvidia.com/t/jetson-nano-faq/82953
Q: How to autorun an app or commands at startup?
If this still does not work, please replace it with a non-gui script to see if any difference.
Thanks.