It seems to be a limitation of TrueNAS SCALE and a Feature Request was created: https://forums.truenas.com/t/vm-shutdown-timeout-remove-the-limitation-for-max-300-seconds/15124
Is there any known workaround? I cannot believe that noone else had the problem before.