If a bequest wrongs the heirs, it should be withdrawn
Retracting such a bequest is not only permissible but also better for you and more correct with regard to the heirs, and the evidence for this is also established from the Prophet ﷺ.
Reference: al-Lajnah al-Da’imah: 13977