I don't know if this works on all trucks yet, I install a switch on mine. https://gmauthority.com/blog/2022/01/how-to-disable-the-gmc-sierra-multipro-inner-tailgate/
It's pretty slick, and makes a nice dust cover too. I wasn't worried that I'd forget, but if I loaned my truck out, I wouldn't have to worry.another option would be the curt tailgate sensor that disables the switch when you have a hitch in the receiver - https://www.curtmfg.com/tailgate-sensor