On the LXD 3.8 release announcement I found:
CLI override of default project
Many users reported that interacting with multiple projects can be tedious due to having to constantly use
lxc project switchto switch the client between projects. This is especially true when all you want to do in a particular project is a simple action like starting a container.
LXD 3.8 now has a
--projectoption available throughout the command line client, which lets you override the project for a particular operation.
However, lxc list –-project project-name returns an empty list
Tested on 3.16