Toddler bed & toddler issue

My son is 3 & we have a crib transitioned into a toddler bed but we ended up putting the side back on so he couldn’t escape,

We tried the toddler bed and every night he would just climb out the bed and run back to the living room

Long story short 8pm bedtime , he’s out down

8:30 he’s out

9pm we put him back

9:05 he’s back out

There’s no way to just lock him in his bed without him escaping and thinking it’s a game

How do I let him use his toddler bed without him running back out to us

I guess how do I “train him” to just go to sleep lol