How to fry Rösti so that it stays together?
Get rid of the water. That's probably why you have had better luck with the prepared rosti. After shredding, salt the potatoes and wring the heck out of them using a clean towel. America's Test Kitchen has a fun little trick in their recipe for latkes. They wring the salted and shredded potatoes over a measuring cup. After a few minutes, the starch from the potato settles in the bottom of the cup. Carefully pour off the water and add the starch back into the potato. As Bridget says, "You know the amount of starch is right, because it came out of the same potato."

Also, par-cook the potato after wringing, before frying. A microwave works well for this, you can also use an oven at a moderate (350F, 175C) temperature, covered with aluminum foil.

For French fries you want to remove the starch (that's why a water soak is recommended) but of course with French fries you're not trying to keep them stuck together. You want rosti to stick to itself, but not the pan. Keeping the starch but eliminating the water will help.