Hello, thanks for the explanation.
I was able to finally solve it by using
srun -n 1 --exclusive /path/to/julia_version-number/bin/julia -O3 -- script.jl $i > $i.log &
and including #SBATCH --mem-per-cpu=500 in the batch script.
Could you imagine that this memory/CPU management somehow influences the julia 1.5.1 behavior in another way than it was the case in julia 1.1.0?