Yeah, it’s not going to fix that updates can come in too early if you just delay when the replica publishes active. It’s still going to show up active when it’s not. That gets rectified if you end up replicating the index, it’s when you peer sync that it can be a persistent problem. And in both cases, you can end up with a window of incorrect queries.
The most straightforward way to handle it is to use the cluster state rather than the cores from the core container when publishing down (where it doesn’t currently use the downnode command) and when waiting to see the state.