phoenix does not remove class 'phx-no-feedback' from errors inputs after submit form

Expected behavior

I’m playing with a multi step form.
I expect that when I fill a required input and submit, others required inputs needs to show errors like ‘cannot be blank’. So when I submit the form the class called ‘phx-no-feedback’ has to be removed.

Actual behavior

When I set a if clause on alerts on file live.html.heex to not depends on css class ‘alert:empty’:

After implement it on Phoenix, it stops to validate form after submit with errors. Only last step shows errors, others steps with its inputs filled with the class ‘phx-no-feedback’ does not removed so in this case the inputs continues not showing the errors messages.
If I remove if clause and use the class ‘alert:empty’ it works normally.
Why it does not works with if clause?

Repository link to reproduce: