Better to eat less calories and consume small amounts of protein throughout the day.
I tried IF a couple times in my life. First time, coupled with lots of endurance exercise, worked great but I was constantly fighting to retain muscle. Second time I didn't exercise as much but also didn't lose any weight. I did develop extreme post-meal fatigue though, and that has persisted for years since stopping IF.