Restricted shell with distillery

I create a release of my application with Distillery and have the following line in my vm.args.eex file:

-stdlib restricted_shell "'Elixir.SafeShell'"

When starting the application, after creating a release with, app_name console I know that the parameter is evaluated because passing an invalid module causes an error. However, the iex shell launched with app_name console is not restricted, and connecting to it with iex and --remsh also does not provide a restricted shell.

How is it possible to enforce a restricted shell with Distillery?

I’ve never actually used restricted shells. Does it work as expected with a release in Erlang instead of Elixir? If so then it sounds like an Elixir bug, if not then probably not by design but they’d probably accept a PR fix?