concern with relationship to stepson

My stepson is usually relatively polite when we are a family (my husband, stepson & I) but when the grandparents are thrown in the mix, especially when my husband is not around, he becomes disrespectful to me, talks back and corrects me often. It really flusters me, especially in front of my in-laws. When there is a balance between disciplining and “he is who he is” mentality -I’m not sure what to do. I usually just laugh it off/semi-discipline him and then get very upset inside. I now purposely avoid being around my stepson when he is with his grandparents, and that makes me sad because I really enjoy them.

Here’s my first draft model:

C – Stepson behavior with grandparents
T – I’m hurt and super annoyed that he is being disrespectful to me in front of his grandparents.
F – Hurt
A – Avoid situations with him in it
R – Tension and lack of a relationship with my stepson, especially with in-laws around.

C – stepson behavior with grandparents
T – His grandparents don’t enforce rules with him so it’s natural that he would feel like he can talk back to me in front of them.
F – Acceptance
A – Discipline him regardless of who is around
R – Maintain myself through his fluctuations in parents and guardians.