I was having a look at audiobooks on BorrowBox and I've discovered Her Majesty the Queen Investigates, a book series where the queen solves murders. Samantha Bond reads the audiobooks.
The queen is the dead one, and they're set a few years ago. Murder Most Royal is the third in the series and set in winter 2016/17. The author clearly had Brexit on the brain. How is Brexit going now? Hard to tell with all of the other crises. Nobody talks about it in the UK these days.
As for when it was written, she mentions in the acknowledgements that she handed in the proofs the day the queen died. The next two books are planned to be prequels, set in the 20th century.