I don't want to be that guy but this is one of those cases where you don't understand the code you've posted.
I advise you to start there first, learn and understand what you posted, because otherwise it doesn't matter if you get the problem fixed, you have no idea why.
As a heads up and going through the logic, after attacking you need to set the "is_attacking" state back to false, because the character is no longer attacking, that doesn't magically happen by itself.
You also need to request the animation tree to go back to idle to play the correct animation