Having hung a couple of heavy gates and used expanding Rawl Bolts, the sort that as you tighten them a cylindrical plug moves into a sleeve which bites into the hole in the concrete or brick my initial experience with them was frustrating. Even when I kept the bolt in the hole with a screw driver and pulled back on the threaded shank there was a tendency for the bolt to wind itself out of the hole when I fixed the gate post on it. Discussion with others revealed that this is a common experience so much so that they resort to strong screws instead, resin fixed threaded studding etc.
The way out of this is easy. Get extra nuts and washers for your bolts. Snug the sleeve as before and then put on the spare nut and washer. Finger tighten it and then use a spanner to fully expand the sleeve. You can then take off the nut but if fixing a heavy baulk, batten, ledger, post etc I would leave it on and chop with a chisel a suitable recess/housing to go over the nut. To put on the post it is a simple matter to put it up to the shank, level or plumb and then give it a tap to mark the position for the hole. The extra nut will keep the plug in the sleeve locked in place.
Yesterday I was taking the bolts off to hang a new gate. Go backwards. Release the locking nut several turns out from the wall. Tap on the top of the shank to drive the plug back into the hole in the concrete. With a vice grips jiggle the shank until the sleeve comes back into the loose state. Remove.