The problem in the OP isn't about people overstaying their visa, it's about the effect of Brexit on expats living in Europe EU zone. Brexit effectively made the UK a 'Third Country' and this, to continue living freely there, in an EU country, they were supposed to register as 'pre-settled' (as were EU non-British citizens in the UK) by a certain date.
Under nationality laws - at least in modern democratic states - you cannot discriminate on grounds of personal characteristics such as race or gender, but you can couch it in terms of nationality. Thus, when Denmark, for example, started sending back Syrian registered asylum seekers on the grounds they no longer needed asylum, it couldn't very well not treat UK nationals the same way as any national delegated as 'Third Country'. Choosing to be Third Country was likely the UK's biggest shot-itself-in-the-foot Brexit moment.