Is it possible to redirect myshopify admin page or change query from imbedded app in PHP?

Any redirect causes a “*.myshopify.com refused to connect.” a 302 error, if called like this:

header('Location: ' . $location);

or “*.myshopify.com redirected you too many times.” a 302 error, with echo:

echo "";

It says SameSite=Lax prevents the cookie from being sent in a cross-site request. But trying to change it with:

header('Set-Cookie: cross-site-cookie=whatever; SameSite=None; Secure');

Yet, still, redirect is not allowed.