On LXD host add the following line to map host user and group id 1001 to container user and group id 1001
lxc config set container raw.idmap="both 1001 1001"
Details are explained here: https://documentation.ubuntu.com/lxd/stable-5.0/userns-idmap/#custom-idmaps