Reports suggest that the Duke declined the offer.

Last year, Prince Harry challenged the Home Office’s decision to remove his security privileges while visiting the UK. After stepping back from royal duties, the Royal and VIP Executive Committee (RAVEC) decided to end his automatic entitlement to police protection. Furthermore, his proposal to cover the costs of his security himself was declined, as British police cannot be employed for private use.
“It was with great sadness for both of us that my wife and I felt forced to step back from this role and leave the country in 2020,” Harry’s lawyer, Shaheed Fatima KC, read in a statement on his behalf, according to the BBC.
“The UK is my home. The UK is central to the heritage of my children and a place I want them to feel at home as much as where they live at the moment in the US. That cannot happen if it’s not possible to keep them safe when they are on UK soil.”

The Duke explained, “I cannot put my wife in danger like that, and, given my experiences in life, I am reluctant to unnecessarily put myself in harm’s way too.”
Royal commentators believe that if Harry had truly been offered accommodation at the Palace, he should have taken it. Residing within the Palace grounds would have guaranteed the level of security he has been seeking through the courts.