I agree put the ground as close as you can to where you are welding and make sure it is a good ground. I never unhook batteries. I was welding stuff on to the flatbed in my 2016 Denali last week and I welded a lot on my 2015 F-250. Lord knows they have tons of electronic crap. I welded for several hours last week as well on my 2012 backhoe which also has a bunch of electronics. Never had a problem and never unhooked a battery and I have welded on virtually every vehicle I have had.
Every muffler shop in America welds on exhaust systems all day long and I have never seen them unhook a battery. Every welding rig I have seen welds up stuff on their flatbed and they don't unhook batteries.
It certainly won't hurt anything unhooking the batteries by I personally don't and I really don't even understand how unhooking them would even help anything.
We never unhooked batteries, just to weld something in the body shop either.
Over several decades, of doing this, no damage occurred.
Anything is possible, but I never saw it happen first hand.