I‘m pretty new to this so take that into consideration when you read this.
I use thick Gorilla Glue. Any coral that’s going on to the rock work I typically glue on to a small piece of dry rock. I do that when I dip the coral. I use enough glue with a kicker to help it set initially then I let it set up until it’s “dry”. That pretty much permanently bonds the coral to the dry rock, if I want it off I’d have to cut it off.
When I put it on the rock on the tank I use the same glue. I “test fit” the coral where I want it. Then a small amount of glue on a couple of spots that contact on the rock. I put the coral in place, kinda wiggle it a little to break the film on the glue and hold it in place for a few second.
Typically the coral stays in place even when a snail or something bumps it, but if I want to take it of for whatever reason it comes off easily and doesn’t leave much if any dried glue on the rock work. Occasionally I’ll bump one of the corals when cleaning during a water change and it’ll come off. It’s easy to put back and doesn’t happen very often.