VITE_APP_URL represents the app's production address. VITE_APP_PREVIEW_URL represents its preview address. They are different contexts; a link meant for customers should not send them to the editor's preview.
The platform maintains these system values when the app's address or canonical domain changes. Check the current values in Env Vars instead of copying an old address from another app. Replacing a URL in a source file is not the same as changing the app's configured domain.
Variables beginning with VITE_ are available to browser code. Do not put private API keys, tokens or passwords in them. Store private values as secret server environment variables.
For links that should stay on the current website, ask the builder whether a relative URL is appropriate. Do not replace every address with the production URL: authentication callbacks and preview behavior need their own correct destinations.
Publish changed app code before testing the live address.