As of some newer Git version, sparse-checkout doesn't use patterns anymore but directories as arguments.
So to get the same functionality as earlier, one has to use
yadm sparse-checkout set --non-cone '/*' '!README.md' '!UNLICENSE.md'
but then it works as expected.
This even can be used in bootstrapping if you cd $HOME before.