Place the fence on the block
Put a solid block next to it
Break the solid block
Use a fence gate or wall connection if needed
Use commands in Creative mode if you want a single-block setup
Use a barrier block or invisible block to support the fence visually
Place the fence on top of a block and remove the block below if the fence remains connected
Use a structure block or world edit tool to position it precisely
