You can also drag a file or folder's icon from a Finder window title bar.
When it doesn't work, that's a good indication of a program that's using Electron, Carbon, some old framework, or poorly maintained.
Adobe and Audacity are both guilty of this.