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.
The reasoning behind the change in git sparse-checkout and the downsides of using --non-cone mode can be found here: https://www.git-scm.com/docs/git-sparse-checkout#_internalsnon_cone_problems But these shouldn't affect us for (usually) small dotfile repositories.