Someone can correct me if I am wrong but this is how the IWE (Integrated Wheel End ) system works. When the truck is OFF, the truck defaults to 4-wheel drive. In that the IWE system is engaged. When you start your truck, the IWE system generates vacuum and IWE will disengage.
So if you have issues generating vacuum due to various reasons, the IWE will have issues trying to disengage or partially disengage as you drive away. The loud noise you hear are the gears banging up against each other. Eventually, the gears in IWE diaphragm will destroy itself.
So the fix is trying to diagnose why your truck is having issues generating vacuum. I could be various things like a partially pinched line or whatever.
My wife has a 2018 Lariat and she has been complaining about loud noises from the front end. I could never reproduce it. And then one night it happened.
My usual start up procedure is to let the car idle for 1 minute before driving. So I was driving her truck and stopped to run into a store really quick and came back out and started the truck. I immediately put it in drive and drove away and I heard the noise.
So my wife's truck apparently needs time to build vacuum. Once the right amount of vacuum is achieved, the IWE disconnects with no issues. I could never reproduce the issue because I always allowed the car to warm up for 1 min. Without knowing, I was allowing her truck to achieve proper vacuum by giving it time. Of course I still have to find out why it takes her truck longer to produce vacuum when compared to other trucks.
Check out this video: