From what I'm seeing, Prime doesn't seem to ram into you if you just stand still, so I guess don't move forward after it dashes left/right or just try to strafe around instead. But Iunno, just suggesting something x3
i try my hardest not to fight bosses except when absolutely required (ie: haven't fought prime in years), but i know if you stand on that branch it will very rarely hit you.