Seeing as how Google just recently published a new API just for in-app reviews that looks almost exactly like your version, I would assume that it is an acceptable method to use.
And after just looking it up, I see that Apple has had such a feature for over a year now as well:
So if both platforms seem to be fond of this type of review method, I would simply assume that it cannot be that bad of a thing to do.
Users still have to confirm their decision, I don’t see how or why users would just randomly tap a star and then confirm that rating without further logic.
Other than that I do not have any specific best practices, though.