IT can be fixed using this type of code:

jQuery(window).load(function(){
var hash = window.location.hash;
if(hash) {
setTimeout(function(){
var section_id = hash.substring(1);
var element = document.getElementById(section_id);
const y = element.getBoundingClientRect().top + window.scrollY;
window.scroll({
top: y,
behavior: ‘smooth’
});
}, 1200);
}
});