Try to specify the work dir
https://slurm.schedmd.com/sbatch.html#SECTION_SCRIPT-PATH-RESOLUTION
copies from above link
1. If script starts with ".", then path is constructed as: current working directory / script
2. If script starts with a "/", then path is considered absolute.
3. If script is in current working directory.
4. If script can be resolved through PATH. See path_resolution(7).
Current working directory is the calling process working directory unless the --chdir argument is passed, which will override the current working directory.