Edd difference for change

How much of a difference from your period do you have to measure for them to not go by your last period for edd? With my first pregnancy they gave me November 4th the first ultrasound then second ultrasound changed it to October 15th, not wanting something like this to happen again considering that’s a big difference