With my first that was our routine, the last stretch was in bed with me. I think he just eventually grew out of it
If she's awake in her cot but quiet I leave her, she sometimes wakes at 5, I'll bring her into bed at 6 and she'll go back to sleep for another hour. Sometimes she needs a feed at 4 and then will go back to sleep. If they're going to bed too early or having too much day sleep that can also cause early wakes. If we put ours to bed before 8pm she always wakes up at 4.
We used Ferber method and had the same issue. I sometimes leave him of he's just whinging or quiet and he's gone back to sleep eventually. If he's really sad I just bring him into bed with us.
We have this issue too, so not sure what to advise tbh! My girl slept from 8pm to 2am last night, then fed and back down for 3am, but awake again at 5 😵💫. I can't seem to settle her back in her own bed at that wake, so she ended up in bed with me at this point and slept for another hour or so