The tapped colour is set/reset every frame while the nameplate is tapped. That is what is causing your flickering bar colour. I know of three 'solutions':
- Set the bar colour every frame. (CPU expensive)
- Create your own health bar and display that instead of the provided one.
- Ignore threat when the nameplate is tapped. (Any mob that doesn't become a shared tag once you engage it likely isn't relevant to you.)
The only parts of UpdatePlate() that need to be run in an OnUpdate script are lines 63-65 so you have a massive overhead calling that entire function.