Yes, it works on stock Samsung firmware because the code needed is implemented by Samsung, in LOS it isn't. That's why you can't use it.im not sure? it was working before i updated to lineage? it might not be called 'miracast', its just however it used to cast the screen to the samsung tv.
it still works on my galaxy s7 edge by using samsung smartthings, but smartthings wont work on this lineage 18.1 it just crashes and wont find any TVs?
still no further with wifi calling either......