You must have turned on x-ray shading. Go to shading->x-ray. (something like that). It is on the viewports toolbar.