I tried your minimal test code and it works for me:
The only changes I made is to add a missing action import, removing a comment outside the template and forcing the button to show.
Can you make a quick TC on GitHub that triggers this error?