[ty] Remove redundant use-def state shrinking (#26206)
## Summary
Remove explicit `shrink_to_fit` calls when the underlying buffer is
immediately discarded or a later boxed conversion already performs the
required compaction. This avoids transient copying without retaining
excess capacity.
## Performance
Small 1-2% performance improvement, also reduces the total number of
allocations