Per https://docs.docker.com/config/containers/logging/configure/ it suggests to:
Restart Docker for the changes to take effect for newly created containers. Existing containers do not use the new logging configuration.
Unfortunatelly docker build doesn’t support --log-opt max-buffer-size=XXXm, but buildx does
As “the last shoot”, you can remove --progress plain if you don’t acutally need it