Sleep problems!!

Ca

My 3 yo refuses to fall asleep alone anymore. He wants us to sit with him while he falls asleep at bedtime and if he wakes in the middle of the night. It’s taking him over an hour to fall asleep at bedtime and is sometimes up for 2-3 hours in the night. If we leave he will scream and get out of bed. Have tried switching to standing outside the door and leaving/coming back to check but he still has a fit. We use night lights and sound machine too.

Everything I’ve read online says to keep walking them back to bed and leave the room, but how do you handle the screaming fits? Especially in the middle of the night? Anyone else going through this?