A Will speaks from death. A court cannot make a financial order against the property of a living non-party to a marriage.
After death the Court can take two possible approaches to assets in a DT in the Will.
1 it can vary an ‘ante-nuptial’ or ‘post-nuptial’ settlement under Section 24(1)(c) of the Matrimonial Causes Act 1973. The Settlor can be a non-party e.g. a parent. There is case law on what qualifies as such a settlement.
2 trust assets can be treated as a ‘financial resource’ of a divorcing spouse under Section 25(2)(a) of the 1973 Act in accordance with case law. See for example SR v CR  EWHC 2329 (Fam).
An order cannot be made against the trustees directly but the size of a lump sum order against a party to the marriage can be set in the expectation that it will need to be met to a greater or lesser extent from that spouse’s realistic expectations of future distributions from a trust, albeit at the absolute discretion of the trustees over which the court has no control, and unashamedly by way of a degree of “judicial encouragement” to those trustees to make these.
How long after a divorce a spouse can seek an order is addressed in Wyatt v Vince  UKSC 14 and, in theory, it can be a long, long time after. Even after death, if the settlement is “nuptial” unless, probably, a prior consent order precluded a claim under the 1975 Act and subject to the 6 month time limit. Otherwise DT assets will not be part of the deceased’s “net estate” as judges seem to accept that “financial resources” cannot be craftily augmented by trustees during the deceased former spouse’s afterlife (if any).
A valuable article in the public domain though a little dated is at https://www.wilberforce.co.uk/wp-content/uploads/2014/10/ARTICLE-How-to-side-step-valid-trust-and-corporate-structures-AM-JH.pdf