At the end I achieved to fix this issue by changing this lines in UnrealMatrix.h:
UE_LOG(LogUnrealMath, Error, TEXT("FMatrix::InverseFast(), trying to invert a NIL matrix, this results in NaNs! Use Inverse() instead."));
ensureMsg(false, TEXT("FMatrix::InverseFast(), trying to invert a NIL matrix, this results in NaNs! Use Inverse() instead."));
To this:
UE_LOG(LogUnrealMath, Error, TEXT("FMatrix::InverseFast(), trying to invert a NIL matrix, returning identity matrix [RG CODE]."));
return FMatrix::Identity;
This is what the Inverse() functions does inside, after this I recompiled the editor and the unreal Lightmasss and it worked fine.
This error usually comes from a null scaled static object that can be identified using the Map Check tool, it would display an error looking like this :