A bit of a problem in edit mode

When I’m in edit mode with “Occlude background geometry” on, the 3D view would sometimes look like the first attachment.

The second image is when it looks normal.

Can anyone help me fix this annoying problem please?:

Attachments