Search.php gets metadata from first post
I don’t think it’s just occasionally, that will always get you the post meta of the first post on a search results page, a taxonomy page, an archive page – any page where there are multiple posts, because the $post global will always be populated with the first post of any main query result. EDIT- … Read more