Pre-boil gravity is notoriously difficult to measure accurately. The extracted wort tends to stratify in the kettle during early minutes after lautering. In order to grab a good sample, you need to stir completely and collect the sample with a cup that you dipped in a couple of places. And then of course, you need to chill it to double digit temps since hydrometer temperature correction at high temps is iffy at best.
You can also use a refractometer, but stirring is still essential and frankly, they can be a pain also - they need to be calibrated and they have a "correction factor" that, until you figure out, you're only in the ballpark.
So there are two main issues to sort out: 1) Wort stratification; and 2) Temperature correction.
To mitigate the first issue, I prefer to take my pre-boil right after hot break - when the boil timer begins - not after lautering. The boil does most of the stirring for you at this point. For the second issue, I use a refractometer that, over time, I've figured out its correction factor.
Another way to get pre-boil gravity is to very accurately measure boil-off, then compare OG (which is easy to get) with the starting and ending volumes to determine what your pre-boil gravity was. It's a forensic method rather than an empirical one. But it works just as well. The key is to measure boil-off very well, ideally within a cup or less as your margin of error.