While configuring libpng and freetype it uses the shipped zlib instead of our newer version:
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS18.2.sdk/usr/lib/libz.tbd (found version "1.2.12")
This will break somewhere, sometime when the API/ABI changes.