Pinning files to ST taskbar item works fine for both ST3 and ST4 portable on my Win10 21H1 machine.
As soon as ST4 is installed via (installer), pinning stops working for all instances (also portable).
So the reason for this issue must be related with something the installer does.
I was able to track it down to following registry key being added.
HKEY_CLASSES_ROOT\Applications\sublime_text.exe\SupportedTypes
The key contains

These are the files which can still be pinned. All other files are rejected.
Adding a string value for .txt
enables pinning for text files.
So there are two options:
- Add all file extensions, which are to be supported (maybe many of them are out of scope for core ST installer as support is added by plugins)
- Removing
SupportedTypes
key from registry to enable pinning for all files.