Zend certified PHP/Magento developer

Magento 2.4.5 layered navigation filter showing incorrect results

I’ve recently updated a non-production version of a website from 2.4.4 to 2.4.5.
The site has a number of configurable products with options for colours etc.
The simple products behind the configurables are set to search only visibility whereas the configurable is set to catalog/search visibility. This all worked fine in 2.4.4, 2.4.3 and previous versions.

Since i’ve upgraded to 2.4.5, the filter is broken. All the products that are set to search only are appearing on the category page. If I select a colour filter, eg. green, other colour products are still being displayed.

I’ve tried reindexing, updating the products, setup:upgrade etc and none of this seems to work.

Elasticsearch also seems fine.

The site is running on Ubuntu 20.04, Apache and Php 7.4