Finally! I found out the actual root cause for the problem that I'm having is due to the mouse pointer.
Placing the mouse pointer over the Bluestacks window during the operation of the bot is screwing up with the clicking.
Placing the mouse pointer over the Bluestacks window during the operation of the bot is screwing up with the clicking.