Edges of wide angle lens inconsistently blurry

Hey everyone, I am working on a project where I am taking a photo with a IMX219 of a whiteboard at a pretty severe angle. I am running some post processing scripts on the image to make it more readable and reduce the perspective on the image.

The problem is that sometimes the edges of the image are very blurry, and other times they are okay. There must be some setting I don’t know about that is adjusting itself at times. The camera is perfectly still so I imagine it is possible to get a crisp image. See the photo attached to see the varying levels of blur on the edges.