JSFiddle - React, Tailwind, and code Playground

HTML

<div class="height-adjust"></div>
<div class="e"></div>

CSS

.e {
    left:20px;
    top:20px;
    position: fixed;
    width:200px;
    height:200px;
    background-color:#ccc;
}
.height-adjust {
    height:2000px;
}

JavaScript

$(".e").draggable().resizable({
   start: function(event, ui) {
      $(".e").css("position", "fixed");
   },
   stop: function(event, ui) {
      $(".e").css("position", "fixed");
   }
});