Incorrect MQTT Sensor State After Upgrade

This issue started after upgrading HA Core to 2022.8.1 from 2022.7.x. along with updating HA OS to 8.5 and Node-Red to 13.3.1. Not totally sure where the issue is yet, seems like HA Core, but hoping you all might have some ideas please.

The issue is with one of the MQTT window/door sensors was incorrectly turned on. It has only happened on Sunday just after 4:00am (PDT) the last 2 weeks. First week thought it was a fluke but now that it did it same time (20ish seconds earlier) the next week something seems amok. Different sensor though this week.

Setup is a Raspberry Pi listening to GPIO events for hardwired sensors and publishing those as MQTT to HA binary sensors. Then the alarm setup is in Node-Red to trigger based off these sensors. Have used this alarm setup for ~5 years and has been great until this issue now.

Checking the logs on the Pi side and it did get a random window/door closed event (this happens regularly for whatever reason but always the proper state, in this case closed/off) at this exact time. But for some reason HA interpreted it as open/on.

Not saying the issue does not lie on the Pi side as it is firing an event at this time, but nothing has changed there and the logs state on that side it indeed sent a closed/off event. So, thinking it is on the HA side because of the upgrade.

Anyone else see any incorrect MQTT behavior like this recently? Or have any idea if something might be happening once a week on the device (not seeing anything in the logs) that could cause this?

SensorIssue

Thanks a lot for any ideas!

UPDATE Just found this similar post so something bigger may be going on with MQTT: Switches and Plugs Randomly Changing States - Home Assistant Community (home-assistant.io)