I do not use restoreOnStartup so it might be that rules actually take some time to initialize… more than my things that start pushing state updates
This is my workaround in Device status online monitor
const cronOrStarted = typeof event === 'undefined' || (event.statusInfo === undefined && event.itemState === undefined)
There is also the type property in UI events: JavaScript Scripting - Automation | openHAB (I have not tried this, not sure which version includes this)