What would you do?

My 2.5yo cries every night when we put her in bed. She’s definitely tired and ready to sleep, but she cries and cries “mama mama” even when I’m right there with her. Her pediatrician recommended we just sit and hold her hand until she falls asleep, so that’s what we did for a while, but she would keep herself awake crying for 2-3 hours.

We also have an infant and a few weeks ago I had to put my toddler to bed and then go tend to the baby because I was on my own. My toddler cried for 10 mins while I was with the baby and then she fell asleep and slept the whole night. Then my husband came back home and I sat in her room again for bedtime and she stayed up for 2h crying while I held her hand.

Last week I was ill and needed to run to the bathroom after I put my toddler to bed and she cried for about 8 minutes and then went to sleep before I got back to her room.

So for the past two nights we decided to try just putting her down and letting her cry until she falls asleep, and again she cried for about 10 minutes and then fell asleep.

But I mentioned this to my mom and MIL and a few other people and they all said how cruel it is to let her cry it out. But I feel like it’s a much better alternative than sitting with her while she cries for hours and hours?!

ETA Baby is 7mo. This behavior only started maybe 4-5 weeks ago.