Afaik programs are found in
PATH which is an environment variable and
sudo -E executes a command with
root permissions while preserving the environment of the invoking user (including
PATH), thus any command
x which is found by
which x and can be executed as the current user should be found by
sudo -E which x and be executable with
sudo -E x.
For example, in the case of
jhbuild (GNOME dependency resolution and build automation tool) which is installed into
$HOME/.local/bin by default) this is not the case. How is this possible?