I initially set it as the game just started, it will lock the cursor, but I realized that I must made mouse click or any key to lock cursor for web-based games, this is my fault for not realizing the importance of properly setting cursor locking at the first place.
Now I had it implemented properly just now, but now I will have something more to do before releasing the next version, appreciated your words here.