Thank you for that. I should have said it is either silicone or caulk, not sure which. I am thinking of removing it just to be as tidy as possible in fixing the issue
Paint will not adhere to silicone whereas most caulks are over paintable. I’ve always grouted right up to the ceiling line when tiling if you do need to remove it then a sharp knife is reqd to carefully cut along the ceiling and then along the tiles . It’s not g t he easiest but a lot of patience will see you through the little bits will take forever..
Easiest way I find for something like this is a single sided razor blade. They can bend just enough to be held flat against the surface, like your ceiling, then just pull it along the joint. Fiddly but makes a very good job of it.
If it is silicone then you can buy a solvent remover. Good if you need to protect surfaces. Also, there is an abundance of silicone removing tools out there.
I concur with the razor blade method.
The silicone remover stuff I tried was a bit like spreading strawberry jam on it till it softens up at which point it still needs to be physically scraped off and cleaned up. I wouldn`t use it again.