I use usbipd-winfor sharing locally connected USB devices to other machines, including Hyper-V guests and WSL 2.After that my application can scan serial port in docker
usbipd-win
https://github.com/dorssel/usbipd-win