Crop/Split Selected Lines to Selected Areas tool

I'm having an issue with Crop/Split Selected Lines to Selected Areas tool. Sometimes I don't get any lines splitted and sometimes I get some of them but not all. I don't know if i'm doing something wrong but I've seen there was a bug in 2018:

Thanks in advance.