keyboard – New macOS install stuck on loading screen, but works in safe mode

First a bit of history:

I had installed Bootcamp on my MacBook and to give it more space, I had deleted macOS recovery and system partitions from Easus Partition Manager on Windows. But because of this, I wasn’t able to install macOS back as Internet Recovery wasn’t able to download.

So I booted it in Target Disk mode and wiped the SSD clean from another MacBook. Internet recovery now downloaded fine, but now I got “Downloading installer information to the target volume failed” on trying to install the OS.

So now I did a Disk Utility “Restore” via target disk mode from the other MacBook, but on booting, I was getting APFS PreBoot volume not found error, I followed this guide to manually create that volume: and now that the SSD was fixed, I clean reinstalled macOS Catalina via Internet recovery.

But after installation, it seems to be stuck at the loading screen with the Apple logo and the loading bar at around 60%. However, it boots just fine in safe mode. Also while in safe mode, I noticed that it can’t properly recognize my in-built keyboard, even though all keys work just fine on trying. If I go to keyboard settings in safe mode, I see the following screen:

enter image description here

The “Change keyboard type…” shouldn’t ideally be there. I know because I tried booting another working MacBook to safe mode and I don’t see that button there.
On clicking on the button, I see:

enter image description here

BTW I got the above screen on the first safe mode boot as well.

Then I clicked Continue, and I try clicking on the button to the right of the left shift key, i.e., Z:

enter image description here

I am not sure if that’s the reason for it not booting up, but just putting it there.

I have already tried NVRAM reset, SMC reset, DFU firmware revive, installing Mojave, Big Sur. None helped.

I also tried unloading and even deleting the Apple HIDKeyboard, TopCase and MultitouchDriver kexts, thinking maybe the driver isn’t able to communicate with the built-in keyboard/touchbar/touchpad properly, but that didn’t help either. I am almost at the end of the list of all things to try. My MacBook is out of warranty. As such, I am asking here for more things to try out before sending it out to the service center.

Thanks a lot!