Rating or reviewing an app from the App Store on iOS always silently fails. How to fix?
Got a working solution after filing a support ticket.

Click "Write a review" to open the long-form review UI. Don't click on the stars at the top; if any number of them are already highlighted when you open the long-form review UI, click to the left of the first one (just like if you wanted to give the app an invisible 0 stars rating) to clear it.

Write the title and explanation on your review as normal, click Send, and you will be prompted to assign a number of stars. Now you can click the number of stars and save/send the review.