So not done this before, but just tried on SuperStore and seemed to do the trick...
So change your formula to anything where the data will generate at least one value for each of the options.
If [CustomerID] = "111" then "Time Missing"
elseif [CustomerID] = "222" then "Good"
elseif [CustomerID] = "333" then "Partial Out of Window"
else "Failed" end
and then go to the default settings for the field and set the colours/shapes you want for each one.
Now go back and change your formula back to the original one (btw it's probably easier to just comment it out the original formula-> put in the dummy formula -> delete dummy formula -> remove commenting out)
Now Tableau should remember the colours/shapes you want for each Violation type.
Hope that does the trick.
Find my approach as reference below and stored in attached workbook version 9.3
Based on using a "scaffold" template with all available values I am able to define 5 different position. 4 values + null.
Please realize that the file is with the Template Colour Indicator is now primary. May it's not possible to work with a scaffold solution in your scenario.
Colour indicator.twbx 21.2 KB