Is it okay to leave baby in crib for 10-15 mins and walk away?

I’ve been trying to get my 7 month old to take a nap for 2 hours now. He’s been tired and rubbing his eyes and yawning for 3 hours now but he will not go to sleep. I’ve attempted to get him to lie down so many times and I’ve tried everything I could possibly do to make sure he’s comfortable. He just gets back up and stands holding onto the rails and looks out. I’m extremely frustrated because I need a break I feel bad for leaving him but I am not sure what else to do except maybe wait and see if he can fall asleep on his own 😖