if you're still playing this, the dash has i frames. you can dash through its dash attack, run up to it and hit once. then move away and rinse/repeat. if you haven't already, im excited for you to see what happens after that fight.
With your advice, I was able to beat both bosses!
Heck yeah! How'd you enjoy the second one? Caught me off guard with all the new moves lol was pretty sick.