OK.
1) The browser submits campground.php?action=workshed
2) Relay script campground.ash gets called. It submits the request to KoL.
3) KoL redirects to choice.php?forceoption=0
4) We follow the redirect and get the page.
-- KoL and KoLmafia believe/know we are in choice.php
5) Relay script returns the page and KoL sends it down to the browser
-- The browser did not see/submit the redirect to choice.php, so it believes it is in campground.php
6) When you rearrange the models and click the "Save Configuration" button, the browser appends the form fields to "campground.php?action=workshed"
-- If you had let the browser handle the redirect itself, it would append them to "choice.php?forceoption=0". Which is sort of weird, but KoL handles it fine.
You have campground.ash.
That is called when we are about to submit a request to campground.php.
Your script can do visit_url() to submit that request.
Your script knows what URL that will be:
string get_path() -> "campground.php"
string get_path_full() -> "camground.php?action=workshed"
string get_path_variables() -> "action=workshed"
You want to manipulate the mushroom garden? Only do that if get_path_full() is "campground.php". I.e., if you are looking at the whole campground. If you are not doing that, return without doing visit_url()/write()
My other conclusion is if you want a relay script that actually manipulates the train set, is has to be in choice.ash, not a campground.ash.
Or choice.1485.ash if you are using Ezandora's Choice Override framework.