It has been established law for some time that when drafting a Will a solicitor owes a duty to the client and also to any third party beneficiary. The High Court recently had to consider this issue in the case of Badenach v Calvert  HCA 18.
The High Court has found that there is only a duty owed to the client making the Will and the intended beneficiary if their interests are aligned. This is a practical finding.
If the interests of the third party beneficiary are not aligned with those of the client making the Will then the solicitor only has the duty to the client making the Will. It makes sense that a duty cannot be owed to the client and the beneficiary if they have different wishes.