Platform-atmelmegaavr currently depends an outdated version of dxcore (1.4.5 and 1.4.10 available on PlatformIO, but 1.5.6 available on GitHub and Arduino IDE). This causes build failures for AVR64DD28, and several bugs have been fixed in recent versions.
See also post: https://community.platformio.org/t/workaround-for-avrxxddxx-dxcore-outdated/32610?u=mr.vang