The issue is that when the extent property of a mapview is changed, it causes the map to jump to (what appears to be) an arbitrary location.
It can be seen in this codepen - https://codepen.io/gaureezh/pen/qBxmVbZ
when we remove the comment on line 40, the map location jumps to a different location.
What is the reason for this issue? How are we supposed to use the extent property of MapView.
Either set the zoom and center or the extent, but don't try to do both or the map has to move from one location to another.