Do you have legit mode or opacity mode on? They will not work with OptiFine
@wolfie This is an optifine issue. Unfortunately I do not know how to solve it besides removing optifine completely.
Delete it from these two locations and restart: