I dont know your code, but in the default line style the ref shields are processed like this


# Display highway shield for mayor roads if they have a ref and make them searchable by their name
(highway=motorway | highway=trunk) & ref=* {name '${ref|highway-symbol:hbox}'; addlabel '${name}'}
highway=primary & ref=* {name '${ref|highway-symbol:box}'; addlabel '${name}'}
(highway=secondary | highway=tertiary) & ref=* {name '${ref|highway-symbol:oval}'; addlabel '${name}'}

name=* {name '${name}'}
highway=* & ref=* & highway!=motorway & highway!=trunk & highway!=primary & highway!=secondary & highway!=tertiary
    {addlabel '${ref}'}

highway=* & int_ref=* {addlabel '${int_ref}'}
highway=* & nat_ref=* {addlabel '${nat_ref}'}
highway=* & reg_ref=* {addlabel '${reg_ref}'}

So if you dont like to see them, just delete the highway=tertiary from line 4 and 7 right?

BTW if 5580W does not exist in real life, the OSM data should be corrected by editing the map.