On my main Debian 11 host I have found one formula that works for ssh logins as well as xterm login on a Mate desktop:
I followed most of the formulas on the Debian wiki and suggestions made here plus some experimentation and did this:
1. Set my desired path for users in file /etc/environment
$ cat /etc/environment
PATH=/opt/rakudo/bin:/opt/rakudo/share/perl6/site/bin:/usr/local/bin:/usr/bin
2. I put the identical path in the usr PATH entry in file /etc/profile
3. I copied my .profile file to .xsessionrc.
The result was, regardless of login method, as a normal user I had the same PATH (plus any changes from my ~/.profile file).
4. I modified the root PATH entry in file /etc/profile
When I became root via "sudo -s" I got root's path from /etc/profile. When I became root via "sudo -i" I got the desired PATH change from root's ~/.profile.