Matching packaging sizes is not necessary - I have had prescriptions that do not match packaging sizes many times - they will cut up sheets or transfer to other containers as needed.
I can't find anything to suggest EU rules prevents split packs - I do see there was a tightening of the rules on how to treat packs if dispensing split backs a few years ago, but nothing since. Do you have a source?
EDIT: At least as late as per the False Medicines Directive going into force in 2019, split pack dispensing was explicitly allowed - the FMD set out rules for the controls required to do so. E.g. the original container can not leave the dispensary until its entire content is used, and the pharmacy can't re-sell or supply other pharmacies with it.