Try telling your partner to leave you alone?
Also, what’s your workspace? It helps if you work in a separate room with a door. Working in a central open spot like the kitchen table invites more interruption. Of course this is hard to do if you’re in a small apartment.