I really hate the offside rule how it is. Plays like this shouldn't die because one player is literally half an inch too far forward.
Just adopt a hybrid of what we have now and soccer offside. Blue-line or furthest back defender is the offside line, which is closer to the opposing goal line.