Strange viewer.flyTo behavior

I meet a strange issue for viewer.flyTo(entity, offset) methods.

I want to change the entity.position in my program, and the flyTo function does not work as expected. But it I make entities as a static object, it works fine.

I attached two sandcastle for example:

The above one behaves strange.

This one works fine.