First things First , do not attempt the perfect boss runs until you have maxxed the Photon Launcher. Also if you get hit by the boss , simply die and continue and try again. The checkpoints are just before each boss in the game
Method for the Boss Fight
Keep shooting straight ahead , the boss will either throw his weapon at you or charge you. If he charges you dash up once and dash past him , then continue shooting him and he will attack again. If he throws his weapon at you dash up over it and then back away from it. Keep shooting after you land.
Once he gets to 50% health he will transform in to a huge boss. Once he appears , dash to the opposite side of the screen. Keep shooting at an angle. Be sure to dodge the lightning on the floor. After he does this dash to the back of the screen as far as you can. He will now jump , Dash straight across and continue your assault. Dodge the lightning on the ground again and by this time he should be dead.