When we added dedicated support for date ranges we also added a fallback for the old, “automagic” way of detecting them (i.e. are there two dates in the paragraph, if so consider it a range.)
This fallback relies on checking the number of child elements in the paragraph. When expanding the modal, the modal element is added as a child element as well. This is why there are different results when clicking a date depending on whether a modal is already open or not.