The issue here is that when shellout.arguments() is used with the Erlang platform gleam run -- ARGS works differently from escript SCRIPT ARGS.
gleam run
Shell: gleam run -- one two three
Args: shellout.arguments() == ["one", "two", "three"]
escript
Shell: ./script one two three
Args: shellout.arguments() == ["./script", "one", "two", "three"]
The annoying thing here is how the behavior changes not that one is necessarily more correct than the other. I often use gleam run during testing and expect the compiled escript to behave the same way.
For anyone else running into this issue, the argv library does handle escripts consistently.