Sounds like a body control module freaking out. Possible that it could also be a door latch feeding a bad signal to the bcm too. That’s though to accurately diagnose without being able to see the bcm input data when the concern happens. Theft system trigger history data may show something too.
My truck did this after I rotated my tires and had a low tire pressure warning. The tire shop did not reset the sensors. I got the GM tool and reset the TPMS and it stopped doing it. Not sure if it’s supposed to do that or if it was a software issue. It was weird because it didn’t always honk the same amount of times.