As @nukeurself said, the owl function called at the wrong time. As he mentioned appending the following line to render()
function makes the owl function called at the right time.
if (is_admin()){
echo "<script>$('.owl-carousel').owlCarousel();</script>";
}
But this doesn't solve the width problem. In order to solve both owl function issue and the width issue, the following code lines have to be appended with the render()
function. The following lines make the owl function load after the elementor scripts are fully loaded.
...
protected function render()
{
...
if (is_admin())
{
// solves the width issue
// The javascript called after elementor scripts are fully loaded.
if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
return;
}
echo "<script>$('.owl-carousel').owlCarousel();</script>";
}
}