Were you thinking about leaving before the last 2 weeks when you went back to work? How long had you been a SAHM for? 8 years?
You are both in an adjustment period. You no longer have the energy or time to do all the stuff you were doing as a SAHM, tired from work and probably from peopling with people other than your own children if you've been a SAHM for a long time prior. You are probably also because of this suddenly less inclined to enable his behaviour. However, not speaking to him for a day doesn't sound like you've managed the situation 110% well either.
He's in an adjustment period with you going back to work as well. He's come to expect that you are managing the kids and the house and he has been able to focus solely on work. Yes, he is being a tool, but it may be that he's not fully got the memo that the set up of your lives has got to change if you are both working. It may help to sit down and have a(nother) conversation about for this to work you need him to take a greater share of the domestic responsibilities, and can no longer rely on you to be able to do everything.
You do need to talk about him coming home at 12am - in a calm way when you can both be adult about it - and get a sense of what happened. Was it an emergency at work - and why couldn't he have at least texted to communicate he would not be home? Was it an emergency on his case, or someone else's? If someone else's, did he really have to be there especially when you'd communicated that you had plans, or did he volunteer to stay and help when others who were objectively in the same situation as him said "sorry I have plans/need to be home for my kids" and left others to deal with it? Could he have dealt with his part of it from home by being there and present but keeping his work phone on if they actually needed him? He's clearly tired and stressed out from work, but he may need to put in some more boundaries at work which may be a process over several months if people at work have come to expect that he will step in at help with the out of hours crises.
--> I have been that person that they all expect to do the out of hours stuff. I have unpredictable and sometimes chaotic work hours as well, and have to deal with real emergencies that sometimes screw up evening plans, and sometimes have me working to the small hours. However, the difference is that I communicate about where I am and when I'm likely to be home, or pick a time to leave there and get home and pick it up again. I do however try to decline getting too involved in other people's case emergencies if I have actual plans, or give them a clear cut off time after which I can no longer assist them and they are going to have to take the reigns back. Setting that boundary is really hard when everyone has come to depend on you - you feel guilty about leaving your colleagues in the s* and it's not fun.
If he's WFH, why can't he pull dinner together, or can one or both of you shove everything in a slow cooker first thing in the morning, so that dinner is done when you both finish work? In the winter, the 7am throw things at the slow cooker is our go-to when I'm WFH, and we make enough for at least 2 meals. Honestly, the best thing we bought for co-habitation bliss. And/or at the weekend one of you make a big pasta bake or shepherds pie or whatever so that there is dinner for a couple of nights ready to go.
A shift to being a bit more organised about meal prep will take the pressure of you, reduce this sort of argument, and also give both of you some time to spend together to decide if you do actually still want to be together.
I suspect from what you've written that he's oblivious that you are considering leaving him and possibly oblivious that he actually needs to change the way he has been living for the last few years for the sake of all of you if that isn't what he wants.