In general, we believe that the W3 HTML Validator is outdated nonsense and has zero real world impact.
Most things flagged by it are completely valid, and are built out by WordPress and/or Yoast. Any issues dealing with code put out by either of these should be taken up directly with WordPress or Yoast directly.
As of 2023, we have no reason to believe that Google has any issue with any HTML validation issues from either WordPress or Yoast.
You should therefore totally ignore the W3 HTML Validator tool.