Host your Node.JS Backend separately from the React Frontend app and create a .env file in the Remote Backend project. You can try setting up dotenv this way.
.env
dotenv
import * as dotenv from "dotenv"; dotenv.config();