Based on https://github.com/spring-projects/spring-boot/issues/33623.

Tomcat disables TRACE requests by default, which results in a 405. Spring Boot handles the resulting ERROR dispatch, and FrameworkServlet delegates to its parent for doTrace handling as usual. The result is in an error response with HTTP TRACE (instead of error) details in the body.

The issue will be fixed at the Servlet level with https://github.com/jakartaee/servlet/pull/545, possibly for Servlet 6.1, but meanwhile we can apply a temporary fix in FrameworkServlet.