I added that code to the plugin and it fixed the issue. It wouldn’t surprise me if a plugin changed something with get_posts as the site has a ton of plugins installed.
We see it on all search results page no matter what the search term and the results are.
I did some more troubleshooting on my end and it does work when I switch to a default WordPress theme. I also figured out that if you add an event to the calendar then it will worked when logged out even when Yoast is activated.