Please, show more details what exactly you are doing and share error messages. When you do that, please follow the below guide to format your post:
What many people are confused about is that Docker containers are not virtual machines (even though Docker Desktop runs containers in a virtual machine) so you need a container that actually runs something in the foreground and keeps the container alive. Also each image can have completely different distributions and not all commands will be available in the container that you would usually use.
Docker Desktop always run in a utility vm. Even if execute docker run –device=/dev/dri:/dev/dri (just to be sure: this is only a snippet and not the full comand), it will be run inside the utitlity vm, which has no access to that device.
Docker Desktop is meant for development, not for running payload 24/7 in production.
If you want to use hardware acceleration, you need to remove Docker Desktop and install docker-ce instead. If you need a ui to manage docker-ce, you can run Portainer as container.
Google should find plenty of posts that discuss how docker-ce and Portainer need to be installed.