Thanks so much for this solution, it works a treat.
I have also found another solution which will work without showing the bubbles:
Type in the following:
/effect give (your user name) @s minecraft:invisibility 9999 255 true
I found this works a treat but I am grateful that you joined in to help me.