The latest unlocked and unclosed ticket (so far) 6 does not have a clear solution in sight.
However, we can achieve the same result as this fix, by manually exporting the GEM_HOME environment variable:
export GEM_HOME=$(ruby -e 'puts Gem.user_dir')
This way both bundler and gem install gems to the correct location.
A version of this was suggested as workaround in issue 2565.
It should have been possible to simply add this to a system-wide /etc/profile.d/ruby.sh, so that users don't manually have to do this configuration, but the request was closed on the grounds that "upstream will fix this" (even though they haven't managed to do so for more than ten years).
In the meantime (hopefully before 2030) we can tell users to do this workaround with these changes. Now the location where bundler installs to is fixed.