Hi there,
You’re populating the rating element with a query, so there’s no way for the element to tell if and when you delete a review.
Upon deleting a review, you need to rerun the code that populates the rating element, it’s recommended that you wrap it inside its own function so you can just call it whenever you need it, instead of copying the code.