I seem to have found out the issue. The issue is happening only on the front panel connectors when I shut down without safely ejecting. If I yank it out then it happens all the time (It's a different story but I won't try it again though).
The front panel usb might have issue where it loses power suddenly and causes the hdd to not shut down properly, also faced issues sometimes with usb pendrives not being detected.
The sound is like this @9s mark.
28 Nov, 11.35 am.m4a