Do you want to overlap a rectangle with a circle in such a way that the overlap shape contains as many integer points as possible?

Well, I don't know how to do that but I can try something as a start.

The rectangle is simple. If you put one of its corners on an integer point it will contain the maximum number of integer points.

If you put the middle of a circle on an integer point it will contain a certain number of integer points. Now if you slowly move the circle to another integer point the number of integer points it contains will vary with position. But one thing is for sure. When it arrives at the new integer point the number of integer points it contains will be the same as it was at the old integer point.

Now my hunch is that the variation of integer points within a circle when you move it from one integer point to another will be at maximum halfway between integer points. Not only exactly there necessarily, but there too. At least this is the case when you move a line segment along the x-axis. If you put the middle of the line segment on integer points it will cover the same number of integers. If you put it halfway between integer points it will manifest its largest variation in coverage. So I just assume the circle behaves the same.

If my assumption is correct you first place the rectangle with a corner at an integer point. Then you place the middle of the circle on all integer points and half integer points within the rectangle including the borders and check which one gives the overlap shape with the biggest number of integer points in it.