So... I could train them to grow over the side of my raised bed instead of across the other veg?
You're in charge - it's your garden - show them who's boss. If they are clambering off where you don't want them gently lift the growing shoots and point them in another directions - round in circles if you want or back where they came from or onto themsleves....where ever best suits.
If this fails to curtail their wandering use a sharp knife and simply cut off the bits that are off for a wander.... as long as you leave enough leaf for the plant to grow and produce enough energy to put into producing its fruit there should be no problems...
Of course you'll want to avoid chopping off what looks like worthwhile fruit that is forming but if you really need to a bit of a trim should do no harm.
I wouldn't try lifting the plant and resiting it... it's chancy especially if it has reached any size. If your plants are really too much for the available space - thin them by digging one up and dumping it (or havng a go at transplanting - you might be lucky if it is kept out of full-sun for a few days)
As someone has said.... they will go up as well as across - so a few sticks / a frame or something to clamber up can be useful. You may need to do an initial bit of encouoraging and use some soft string to help them anchor to begin with.
You can see where some sci-fi writers got their ideas from!! They seem to have minds of their own. :blink: