Very happy you asked that before just doing it. Too many people still think there is something that will magically "reset" based on the stories of that working on much older GM cars. I heard of at least one 2008 GM car that everything worked normally on after the battery was disconnected, and that made me happy, but there are way too many stories of various computers locking up requiring a tow to the dealer to have them reprogrammed.
You aren't going to solve an intermittent problem by disconnecting the battery. "Inconsistent" can mean a lot of things, but if the locks work properly some times, the programming in a computer is not the cause of the problem. On Volkswagens, BMWs, and 2002 and newer GM products, I would never suggest disconnecting the battery, but if you're going to try that, I would do it in the dealer's parking lot so you don't need to pay for a tow if it doesn't start after that.
Monday, February 8th, 2021 AT 2:05 PM