Using the new heredoc syntax in Dockerfiles used to trigger error messages in VS Code but autoformatting did not interfere with it. Unfortunately this has changed (unfortunately I cannot tell when): since some time autoformatting indents the end marker and following lines which makes it impossible to use autoformatting on save.
This dockerfile
# syntax=docker/dockerfile:1.3-labs
FROM alpine
RUN <<EOF
echo "Heredocs! Finally!"
EOF
CMD ["sh", "-c", "sleep 5"]
becomes
# syntax=docker/dockerfile:1.3-labs
FROM alpine
RUN <<EOF
echo "Heredocs! Finally!"
EOF
CMD ["sh", "-c", "sleep 5"]
after formatting.