The slime entity's outer layer which the player normally sees is not rendered at all when the slime is invisible, and either the player is in spectator, or the slime is on the same team as the player.
Steps to Reproduce:
Spawn a slime
Make it invisible
/effect give @e minecraft:invisibility infinite/effect give @e minecraft:invisibility infiniteChange your gamemode to spectator
Observed Behavior:
The slime's outer clothes layer will not be visible at all. Only the inner cube part with eyes will be translucently visible.
Expected Result:
The slime's outer layer would be visible regardless of it's effect status, shared team with the player, or the player's gamemode.
Screenshots/Videos:
Invisible and visible slime:
Can confirm.