Hi @aggi ,
Using neutral cure silicone sealer would work as it is an insulator so there will be no electrical connection between the wires via the cinder block. Current will still flow through the wires when a slug closes the circuit by touching both wires at the same time
Support the wires somehow until the silicone has completely cured to ensure that they stay in position. Read the directions on the product label about curing time.
If the wires are touching the cinder block along their full length when in position then there may be a problem when it is wet. Not because of the silicone but simply that water may provide a current path between the wires over the cinder block, but presumably you haven’t had any problems with the plastic raised bed so it should be the same, although water may run off plastic faster than off rougher cinder blocks. Maybe something to consider. Dry cinder blocks should be no problem as concrete is also an insulator.
Just be careful if you completely encase the wire(s) with a blob of adhesive that it is not too large, the slugs may figure out how to bridge across from one wire to the other via the blobs if they are adjacent, thereby missing the bared wires. ;-) Maybe alternate where each wire is secured.