Roped fences can be created by summoning leash knot entities
I discovered that you can run "/summon minecraft:leash_knot ~ ~ ~" and it will stay as long as it is on a fence block. It appears that the area needs to be force loaded or else they will despawn.