I have found a workaround to my problem.
I discovered that when you switch on the main power supply of the TV to standby mode, the scheduled recording don't work.
However, if you switch on the TV for a minute and then switch it off to standby mode, the scheduled recording works!
It seems when you power on the TV to standby mode, it doesn't supply power to the attached USB HDD or the TV don't know there is a USB HDD drive attached. But if you switch on the TV, it starts to supply power to the USB HDD or it recognises that USB HDD is attached. So, even when you switch off the TV to standby mode, the USB HDD is still supplied with power or recognised by the TV. As such, the scheduled recording works.
This is a bug of the webOS I think. Hopefully, LG fix it soon!