I find this to be the absolute hardest part of living with someone. You’re at the mercy of their ability to interrupt you and I find it incredibly demoralizing.
Seems like a communication issue though, just explain to them how important it is for you to focus uninterrupted and hopefully they'll respect you.
edit: In explaining this to my girlfriend, I showed her this comic: https://heeris.id.au/2013/this-is-why-you-shouldnt-interrupt... Didn’t make any sense to her. And even after talking about this she doesn’t get that “just coming in for a kiss” is the same thing. Like I don’t want to come across as an asshole, but that’s what it looks like from the outside.