The example sentence does not sound correct.
While I was preparing for my daughter's birthday party, my husband was doing his work in his room, and after he was done with it, he walked out on me to help me.
You are right that "walk out on someone" means a negative action that can hurt someone:
-- Farlex, The Free Dictionary
to leave without finishing something
-- Cambridge Dictionary
It does not work with the idea that he helped me.
To fix the example
To make sense, the example would need to be changed to something like:
✔️ After he was done with his work, he walked
out of his workshop to help me.
😐 After he was done, he walked
out of his room to help me.
This is fine grammatically — but it sounds a little strange. (You are using extra words to describe the walking.) Is this a castle that takes extra effort to walk around in?
It’s better to just get right to the point:
✔️ After he was done, he came over to help me.
You can walk out of doors
So walking out on someone or something is usually understood to mean “abandonment.”
You can, however, walk out on the porch, walk out on a deck, walk out on the patio, or walk out on a balcony.
Here, the word out is understood to mean “going from inside to outside“, or from “indoors to outdoors“.
walking in on someone
There’s a different phrase, “walking in on someone” or “walking in on something,” which is totally different.
There are a lot of different propositions that can be used with the word “walk“: walk by, walk-through, walk out on, walk in on, etc.
The Cambridge Dictionary has a good definition of choices.