Putting a sheep in a 1 block box surrounding it with blocks (tryed glass, and fences) and having one of them being a top slab. If you dye the sheep through that 1 gap (bottom part of the slab that is open space) does not work in survival. Sheep seems to be dyed but is not. Moving dye in inv will give you back one dye. Relogging/shearing will show you the sheep is not dyed properly.
Picture as a reference to see how the box is setup. The 2x2 works the 1 block one does not.
Does MC-107103 describe your issue? Does it work correctly when you are closer to the sheep?