In 1999, Westminster changed the North Sea maritime boundary between Scotland and England to the line of equidistance.
Points on this line are equally far away from the English and Scottish coastlines. This means points south of the line are nearer to England, and points north of the line are nearer to Scotland.
So the 1999 line is not, as is sometimes mistakenly believed, a straight line heading north east. Because that would be rather unfair, as would a line heading directly east.
Here is a map showing the 1987 boundary, and its 1999 replacement (lat/long points taken from this source, which also contains a small, not-very-clear map):
So, how come a point in the North Sea that is north of Dundee can be nearer to England?
The centre of a circle that touches the coast in Scotland and England is the same distance from each.