Node attached with Rigid Body is displaced when the game is resized

@kylins
Hello,
The object attached to the rigid body seems to go off when the game is being resized.


This problem appears to affect only when the root node (canvas) has a widget component attached to it.

As suggested by @pandamicro, rigid bodies should be used only on nodes with RenderRoot2D as the root node.
Canvas comes with a Widget Class hence will lead to issues with rigid body when resized.

This document explains a bit about use of RenderRood2D

So it has been explained in the discord, but I would like to make a note here.
All nodes under Canvas will be influenced by the widget it contains, and the main duty of Canvas is to do window adaptation on resize. To avoid the behavior, you can just put physics node under a RenderRoot2D

Can you explain? I am using Cocos Creator 2.4.12.