The short answer is that it is difficult to map an opened application to a desktop file. It's complicated by application developers doing things wrong, making it impossible to match an application to a desktop-id without hardcoding a map. It's further complicated by Flatpak deliberately making it impossible to get the correct desktop-id of a running application.
If we can't figure out what the desktop-id is for an opened application, then we can't pin it, because we need to know the contents of the .desktop file to know how to run the application.