I used the infinite night vision command in the latest snapshot (i'm not sure if there's more than one so to clarify i used "/effect give @p minecraft:night_vision 1000000 1 true") now for some reason not only does the effect not go away by any means, commands, milk etc, it is also in every world I play in, survival and creative alike and every version.
What happens when you change your brightness to moody and back again? Does it solve the issue?
Also does restarting Minecraft remove the night vision effect?
Note that since you specified "true" in the command, the effect will not show up in the UI.