Rendering priority

if you check ‘disable [the] depth test’ and ‘allow custom depth writes’ in the translucent material then use this for opacity it will sortof do what you’re saying. it will appear over anything with custom depth turned on.

Edit:Tweeked mat in pic

make sure the translucent item has custom depth on.

if the switch bool is true anything with custom depth on will block, if false the reverse.