This doesn't explain everything. I suggest it explains something.
This 'something' will be back to why people in those constituencies (not in all places) voted to leave in the referendum.
If those reasons are to do with what people call 'immigration' - (maybe I'd call it 'race') then what we might have seen is sufficient numbers giving up on their 'class allegiance' and looking to people (the Tories) who think that they represent their '"race" allegiance'.
If this is the case, then we are seeing something classic. When people are encouraged to think that the solution to their poverty, lack of public services is a consequence of 'them', the 'other', the 'immigrant', they switch their political allegiance to a party that has been responsible for their poverty and lack of public services.
(Please note, there are a lot 'ifs' in the above. In other words, I'm putting this up as an argument for discussion, not a set of facts, or a definitive truth. Please take it in that way.)