It sounds like everything is working as intended and that the confusion here stems from not knowing how DNS wildcards are supposed to work.
The wildcard matches any names below the point of wildcard record which are in branches that do not exist (keep in mind, DNS is a tree).
When you added the new *.co.uk.example.com
record (doesn't particularly matter that this new record was a wildcard too, any record would have caused the same kind of effect, eg if you had added foo.co.uk.example.com
) this means that uk.example.com
now is part of an existing branch and now your old *.example.com
record no longer applies to anything that ends in uk.example.com
.
If you really want to use wildcards (usually better to avoid this, but you don't explain your use case), you will likely want to add specific records for all of uk.example.com
, *.uk.example.com
, co.uk.example.com
to restore some kind of similar functionality as you had before.