It is not the User Template files causing the issue at Imaging. It is because jamfhelper wouldn't run reliably.
We have a workaround posted by nkalister which forces jamfhelper to run at reboot during imaging.
https://jamfnation.jamfsoftware.com/discussion.html?id=4831#responseChild23955
I have packaged this postflight script and gave it priority 1 and ticked "This package must be installed to the boot volume at imaging time" to make it run at reboot.
#!/bin/sh
## postflight
##
## Not supported for flat packages.
pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3
## Lock down the login window
/usr/sbin/jamf launchJAMFHelper -path '/Library/Application Support/JAMF/bin/jamfHelper.app'
I hope JAMF developers will get what's causing this issue and fix it in the next release.