The Duke of Sussex had accepted the offer to stay at the palace after making alternative security arrangements