One thing to realize is that different companies have different level criteria, so a senior software engineer at one company doesn't mean a different company would consider you a senior software engineer. Same applies to staff software engineer, etc.
Another thing to realize is that tech companies, in my experience, are less interested in your title and more interested in the work you've done and what they perceive your potential to be.
This brings me to your question: "At what point do you think taking a step back in seniority is worth it?" I think one key thing to consider is whether the step would expand your skillset, stretch you in new ways.