Its the same, although there are some benefits (not necessarily weight-loss related) to sleeping fasted as opposed to digesting while sleeping.
The most important thing is to fit it to your schedule so it works for you, rather than trying to conform to an ideal that is too difficult to maintain.
From my understanding it’s not so much an issue about when you choose to fast and eat so much as many people run into problems when they are naturally hungry during different parts of the day. As long as the fasting happens I think you’ll see the benefits you’re looking for. Where I have run into trouble is when I’ve tried to move my eating window to lunch and dinner time and skip breakfast. I realized quickly that I’m just someone who can feel really hungry in the morning which would make me miserable so I had to move my eating window back to include breakfast and lunch and skip dinner.