Hey @xHaleem,
Just to double check, does this only happen with 5.1? Have you tried installing 5.0 or 4.27?
In either case, you may need to report this bug so Epic can correct it if possible, just remember to check the “Unreal Engine Issues” link before doing so to make sure your problem is not listed there already: