Hello Kamil,
You're probably looking at an issue with localised/non-localised data or with a current date comparison.
When handling UTC dates normally you would use UTC methods to ensure your data is handled properly (i.e. formatDateTimeUTC instead of formatDateTime) however in xpath a corresponding method is probably not available.
And in the more likely case of month-from-date comparing to current date time I don't think your xpath will result in what you're expecting.
Personally I would suggest resolving this with a date constraint instead. Create two date time variables, one which is the start of the month and one which is the start of the next month and simply do [date>= startDate and date<nextMonthStartDate] instead.
Hope this helps