This will be because the mouseDirection argument you are passing is not normalized.
if you change the bullet script to be dir = mouseDirection.normalized(), this will create a unit vector.
At the moment, if the bullet is 200 units away from the mouse, on the x axis, dir will equal (200, 0), whereas if it is 100 units away, dir will equal (100, 0). (thus half the speed)
A unit vector means that the vector will return a vector with speed = 1 in the direction of the vector. so both (200, 0) and (100, 0) will return (1, 0), and a vector (30, 40) will return (0.6, 0.8)
Hope that helps!