It can, but it’s not guaranteed. It really depends on how gung ho you go on weekends.
If your daily goals are at 2000cal and you go 5 days in a row where you actually only eat 1500. You “saved” 2500cal. Then if you go 2 days at 5000cal total, you undid your “saved” total and added 1500cal more.
I try to limit my cheat days to one on the weekend, just like my intake of any alcohol. The problem with two cheat days is that your body is in ketosis for 5 days then off for two, and from what I have read it takes another day for your metabolism and more importantly, insulin production, to re-adjust. I would recommend that you follow keto principles as much as possible on your cheat days so that even if you are consuming more calories, you are reducing the carb/sugar intake to limit the insulin spikes.
Its a lifestyle, not a religion, so if you do it the other 5 days then it will eventually get you where you are going, but you are definitely slamming the brakes on pretty hard by cheating for two days.