I’m not going to give you advice, as I don’t know the details of your situation. But I can tell you about ultimatums have worked for me, which is badly. I have twice given ultimatums - once to my ex-husband 13 years ago and once to my ex-partner 2.5 years ago. Both resulted in the relationship ending - for ME, that was the right outcome; HOWEVER, these ultimatums still haunt me and i am STILL talking about them in therapy now for a few reasons.
First, I did not get the answer I wanted - the answer I got was crushing and left me feeling unlovable, unwanted, invaluable as a person and full of self loathing and resentment that I still carry with me to this day (working on all that crap in therapy after all these years) and it has colored all my subsequent interpersonal relationships.
Second, the way I think about them now is that I gave an ultimatum because I did not have the strength myself to make my own decisions and therefore I absolved my responsibility by forcing the other person to make that decision (and then didn’t like the outcome). When I think about them now, I think that those ultimatums came from a place of internal weakness rather than internal strength and I resent myself for being unable to make my own decisions and forcing someone else to make them for me. Again, still carrying those feelings around and just trying to deal with them now, after all these years.
The only real advice I can give is tread carefully and really think about your motivations and what you are trying to achieve before making any decisions. Good luck