Confusing behaviour from my ex?

My (25F) ex (27M) has broken up with me twice, once in March 2023 and again in November 2023.
After the last breakup I told him I couldn’t be his friend for a while and needed some space. He respected that and only reached out every other week to check in on me. Finally around February of this year we slowly headed towards being friends again. However, he’s always been hot and cold but lately things have been weird. For starters, he randomly told me mid conversation that he would have married me if he had less issues. Then when we hung out recently he was physically affectionate, putting his arm around me while he was driving and kissing the top of my head.
Now, conversation has picked up and he’s initiating contact much more often. I was at a friends over the weekend for a party and told him about it and he told me to stay safe, which doesn’t sound like much but he hasn’t told me to stay safe when I’m doing something in well over a year.

I've been rejected by the guy twice now, I’m in NO way going to ever talk to him about any of this but I was just curious to get some insight from others.

thanks!

Confusing behaviour from my ex?
Post Opinion