I'm (obviously) not going to tell anyone I'm leaving until I have signed a contract with a new employer, but is there a way for me to manage this otherwise?
This all boils down to faith and intent. Are your intentions well placed? Do you believe management is well intended? Then you CAN tell them. You can be up front and be honest and professional.
The point of being a professional is being up-front and honest about circumstances. This is key to being a professional and preserving relationships. You could tell them and it would allow them to prepare, and that's fair and honest.
What is worse, is if they're lead to believe that you're staying for the foreseeable future so they think they've "stopped the bleeding" when in fact you're ready to let them get a lot worse.
Let me be clear:It's not your responsibility to keep them afloat.
However, if you want to keep your relationship in tact with the company and the people there, then you need to be honest and up front.
This assumes all people involved demonstrate good faith in their interactions. It's not an easy thing, but it's the way it is.
... and this is how it works on an interpersonal level as well. If you have a relationship with someone and you KNOW you're going to break away from that relationship for whatever reason and you've made that decision long ago and you're just waiting for "the right time" (IE the right time FOR YOU) then of course this will be considered bad faith. At best, the reaction might be indifference, but the party being used will feel slighted, as they should.
An Employer is different and the same in this regard. Yes, on the institutional level, sure you can abstract away that relationship. But institutions are made of people. You can't just always keep your hand hidden. Because this can be seen as "bad faith" or deceitful. I get it, it's about money and opportunity. But work is about people too and people feel things.
.. and I would consider other items, like whether management has been good to you. Have they taken risks on you? Have they provided you with opportunities or training they normally wouldn't? Have they allowed you to have an extra sick day or two because of something going on in your life?
All these are elements in building relationships and maintaining strong relationships in general means, being up front about your intent. Especially if your actions put people at risk.