The below CSS snippet helped me to create the shadow behing the button
form{
isolation: isolate;
}
.button:hover::after,
.button:focus-visible::after{
content: '';
position: absolute;
z-index: -1;
inset: 0;
background: inherit;
border-radius: inherit;
translate: 0 1.5rem;
filter: blur(1rem);
opacity: .5;
}