Worth being precise here: this is an area where the legal position and the quality question are separate and both matter.
Compounding is the preparation of a medicine for an individual patient in response to a prescription, where an approved product is unsuitable. It sits outside the approval framework by design rather than by omission.
Stated carefully, a compounded preparation has no marketing authorisation, no batch release by a qualified person and no pharmacovigilance obligation attached to it. That is the structural difference from a licensed product.
Beyond-use dating for compounded sterile preparations is governed by published standards keyed to the compounding environment.
Nothing here is medical advice.
Check the beyond-use date and what it was based on.