This is best left to the DM to decide
As long as the target that is polymorphed into a new creature is still the same creature, scrying can find it. So, is the creature still the same?
Technical read of the spell texts
Polymorph says:
This spell transforms a creature that you can see within range into a new form. (...) The target's game statistics, including mental ability scores, are replaced by the statistics of the chosen beast. It retains its alignment and personality.
Apparently, it is still the same creature, just in a new form, and you should be able to find it.
True polymorph says:
You transform the creature into a different creature. (...) If you turn a creature into another kind of creature, the new form can be any kind you choose (...) The target’s game statistics, including mental ability scores, are replaced by the statistics of the new form. It retains its alignment and personality.
Apparently a different creature. It also says you turn it into another kind of creature and refers to a new form like polymorph, but neither does contradict being a different creature, so here it would not be the same creature anymore.
If someone saw a wizard who permanently polymorphed themselves into a dragon and described them, then scrying could be done on that dragon with the "Secondhand (you have heard of the target)" penalty of -5. If the dragon later un-polymorphed (maybe the spell got dispelled), then you would be back to the question above, in how far it still counts as the same creature.
If you turn the creature into an object with true polymorph, scrying may not be able to find it any more, because scrying can only target a creature, not an object. It is not entirely clear if the object still also counts as a creature, because the spell talks about the creature spending "time in object form", which would indicate the creature still exists -- and it does because a dispel magic can restore it. I think it is unlikely to still count as a creature for targeting while in object form.
However...
In the case of both spells, only parts of the polymorphed creature are new (the statistics including mental ability scores), but parts are retained (alignment and personality). Effectively the polymorphed creature is partly a new, and partly the old creature, no matter how the spell calls it.
In all of these cases the underlying question is what makes an individual creature that creature? Is it the form, is it the soul, is it both together? Are you still the same creature when you are reincarnated? Are you still a creature while in object form? The game does not provide clear answers to any of these questions, and while you can try to construct such answers by triangulating between the text of various spells and class features (I am looking at you, shapechange and magic jar) this is not really the spirit of the game.
There are hundreds of spells that do things outside of the realm of our physical experience, and they all can interact with each other, leaving us with nothing but the spell text to try and resolve how that plays out. Rather than splitting hairs about the wording, I believe it is much more in the spirit of the rules to defer such calls to the DM. This is reiterated over and over:
Dungeon Master's Guide, page 4 and 5:
And as a referee, the DM interprets the rules and decides when to abide by them and when to change them. (...) The rules don't account for every possible situation that might arise during a typical D&D session.
Xanathar's Guide to Everything, page 5:
The DM is key. Many unexpected events can occur in
a D&D campaign, and no set of rules could reasonably account for every contingency. If the rules tried to do so, the game would become a slog. An alternative would be for the rules to severely limit what characters can do, which would be contrary to the open-endedness of D&D. Here's the path the game takes: it lays a foundation of rules that a DM can build on, and it embraces the DM's role as the bridge between the things the rules address and the things they don't.
Tasha's Cauldron of Everything, page 4:
The rules of D&D cover many of the twists and turns that come up in play, but the possibilities are so vast that the rules can't cover everything. When you encounter something that the rules don't cover or if you're unsure how to interpret a rule, the DM decides how to proceed, aiming for a course that brings the most enjoyment to your whole group.
I think this is a case where it is sufficiently unclear to best leave the decision to the DM on how to handle it.
That said, to me is narratively more interesting and more in line with the power level of the various spells involved if scrying, a 5th level spell, cannot find a creature that was permanently transformed by true polymorph, a 9th level spell; but it can find a creature that was temporarily polymorphed with a normal 4th level polymorph. This happens to coincide with the technical reading above.