There are already answers on how to make the confirm button works with DELETE in Rails 7 as Rails 7 now prefer Hotwired Stimulus than Turbo. They are answered here: How to call confirm prompt using button_to in Rails with Turbo. The accepted answer works as far as Rails 7.0.2.3, whereas the newest Rails 7.0.3.1 also have an answer below (which isn't an accepted answer).
However, even after trying this, it doesn't work in Github Codespaces. What's the issue?