I tried exactly that yesterday on my 25 year old commuter that I’m trying to update a little, and it didn’t work - the 11t didn’t make contact with the splines, and the lockring didn’t engage.
Should add that my freehub came with an 8 speed cassette - newer freehubs are often sold as 10/11speed, so that might work.