This can be a hard boss if you dont know how to consistently hit him but there is an easy solution: Just move every time after firing the railgun and every hit should connect.