To controller add Magento\Framework\App\CsrfAwareActionInterface\CsrfAwareActionInterface and
public function createCsrfValidationException(RequestInterface $request): ?InvalidRequestException
{
return null;
}
public function validateForCsrf(RequestInterface $request): ?bool
{
return true;
}