Let me give a classic example. The beginning of March falls on a Wednesday, and ideally such a month start would throw off all our plans, because in all 4 weeks of the sprint we would have to treat Wednesday as the start of the week. In fact — no. It will not throw things off, and we should not treat Wednesday as the start of the week either. In such situations I act quite simply. All months (perhaps except February) have at least 30 days. That means the first week on which the first falls in the middle is a transition week from one month to the next, and automatically that means that besides this week we will still have 4 full weeks. Yes, perhaps in the very last week of the current month there will be one day short of calling the week full and complete relative to the current month, but that does not stop me from borrowing that missing day from April to finish the March sprint. In other words, transition weeks are very flexible weeks. In some cases you can ignore them and take time off or finish loose ends from the previous month; in other cases they can be part of the previous month, and in a third they can serve as the start of a new month.
And what about February, whose start falls in the middle of the week? Especially if that February has only 28 days. In that case we will not have 2–3 extra days that we would count as reserve or days off. Here, on the contrary, the situation is more straightforward and clear. 28 days is exactly 4 weeks. There you have a full sprint. What to do in such a situation? Of course, you can try to run this sprint from the 1st to the 28th, taking the actual middle of the real week as the start of each sprint week. However, I do not do that. For me it makes no difference if a sprint ends a couple of days before the start of the month or stretches a couple of days into the next month. The transitional 2–3 days on which we do not write plans and which are not part of sprints always compensate for those lost days (if we need to borrow a couple of days from some month). In other words, in such cases I would try to close all January tasks around the 28th–29th, and use the remaining couple of days of January for the start of a new sprint. In fact those reserve days of January would go into the new sprint for me. That way I would not have to start a sprint from the middle of the week, and I could use my usual schedule.