Fixed by adding a wait for the page to reload after clicking delete, similar to related cases where form submission is triggered by JavaScript. The failure was probably specific to Chrome, not PostgreSQL, Firefox web driver might have waited for the form submission already. The fix was verified by forcing the race by simulating that the form submission started only after the WebDriver click returned by delaying the submit by 100ms with a temporary event handler (4/4 runs failing before the fix, 4/4 runs passing with fix).
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.