You haven't mentioned if your job is toxic or not; if it is toxic then definitely finding something better is immediately recommended as nothing is more valuable than's one's health and sanity.
What I see as a good way out is to find ways to minimise the time you spend managing relationships with people if you really think they are a time sink. Or compartmentalise it such that it gives you those focused hours to work on the things that matter. What do other successful associate professors do? Speak to them if you haven't.
And I think you are painting a very positive picture of software engineering jobs. In fact except for initial grades, once you transition into staff/principal grades you will again end up spending a lot of your time managing the relationships with people (stakeholders, your manager, your junior engineers etc). And being very good at programming is a necessary but not sufficient trait even in good companies which minimise dysfunctional politics. You can easily deduce what's more important where dysfunctional politics is rampant.
I would second the option to take a leave of absence for a year, but speak with a few select people but in detail actually doing the roles in different companies you find interesting and then take the leave of absence if it's worth it. My bet most likely is that the results of experiment will say to minimise the negatives at your current workplace than starting from scratch. Either ways, Good luck!