I’m trying to put myself in his shoes to understand
Why?
Having spent 5 years contorting yourself into a preztel to try & please this man, frantically doing the Pick-Me Dance for him while he gets a buzz of how much pain he can cause you & still keep you pining for him, why are YOU trying to understand HIM?
https://www.chumplady.com/2012/04/the-humiliating-dance-of-pick-me/
You already know what he is.
He's a prick who can't keep it in his pants, a bare-faced liar who doesn't respect you enough to give you honesty, & a manipulative little shit who will say anything that comes into his head in order to keep you undermined & desperate for him.
He has literally been amazing and done a 360 even though still sometimes a little emotionally distant.
This is literally true, but not in the way you think it is.
360 degrees is a full circle. When something does a 360, it ends up in exactly the same position it started at.
Your b/f hasn't changed, he's just telling you what you want to hear, to reel you back in so he can belittle & abuse you again.
Deep down, you know it's true, because you feel the emotional distance.
Even without all his other bullshit - why would you settle for an emotionally distant b/f? You can't maintain a relationship with somebody who withholds his emotions.
So why are you torturing yourself with this unworthy man?
He cheats, treats you abominably, then Hoovers you back in with a bit of Love Bombing. It's a test to see how much abuse you will tolerate. You are just a pawn in his sick game, he doesn't give a shit about you.
Take comfort - he doesn't give a shit about anyone else either. Certainly not all the other women he's cheated on you with. He''ll be giving them the same Idealise / Devalue / Discard cycle he gives you. He's a lowlife abusive cheat - they all use the same Script.
This can't have been easy to read, so I hope you take my bracing words as the Tough Love they are intended to be. I wasted too many years of my prime on a similar character, & don't want to see yet another young woman throwing herself away on a worthless shit. So learn from this experience - read the links below, & STOP wasting your life "trying to understand him". Instead - understand the toxic dynamic you have become trapped in, & release yourself from it.
Give yourself permission to drop this chancer, & move on with your life.
He will NEVER make you feel happy, secure, confident, or trusting.
He will NEVER change.
There is nothing more you need to understand about him.
Do yourself a giant favour, & imagine how good it would feel to dump him. Brutally. Just to text him a "Dear John, it's none of your business who I dated when we weren't together, you are a lying cheat who doesn't deserve me, so I'm moving on - never contact me again, byeeee" ???
I strongly suggest you liberate yourself by doing just that.
Then take a good few months away from any dating, just to focus on yourself & your boundaries. Maybe access some counselling to explore why you tolerated such poor behaviour from a stupid shit of a man, certainly do The Freedom Programme - link below.
https://www.freedomprogramme.co.uk/online.php
All of this is meant in good part OP, none of it is a criticism of you, but I seriously wish you would galvanise yourself to understand that you deserve better than this worthless man. And DO NOT try to plaster over the pain of finally splitting up with this man by rushing back into dating. You need to do some work on your self-esteem, to grieve & heal, & take time to learn how to value yourself. The links below will help with that.
Now ditch that appalling man, & congratulate yourself for finally losing his malign presence in your life.
https://lonerwolf.com/hoovering/
https://www.verywellmind.com/devaluation-and-idealization-in-bpd-425291
https://health.clevelandclinic.org/love-bombing/
https://www.amazon.co.uk/Woman-Your-Own-Right-Assertiveness/dp/0704334208