Since it's Zelda 2, is this using Platform behavior? You can do something like this:
On press attack -> Change animation to attack + Platform behavior start ignoring control input
On attack animation finished -> Platform behavior stop ignoring control input