Technically, this isn't always true. But in general the overhead of using JavaScript isn't the actual blocker for making good UI experiences for a platform.
Javascript is only one of the aspects. With native apps you also get Hardware-accelerated GPU rendering on UI controls. Thus making the UI appear a lot smoother.
While mobile browsers accelerate some parts of a webpage using GPUs, most parts of a webpage are not. This is due to the huge amount of complexity in layouts on a typical webpage. Same is true even for most desktop browsers, with the exception of Firefox when you use WebRender on a supported nVidia GPU ( but even that is in beta).
This is the reason why Google built flutter like a game engine, so that it could use the additional GPU horsepower on mobile apps to make UI appear more smoother and natural.