@paypal/react-paypal-js throwing contradictory errors: "sdk is already loaded" and "window.paypal.Buttons is undefined"

I am using the @paypal/react-paypal-js library to integrate Paypal Buttons into my app like this:

 import { PayPalScriptProvider, PayPalButtons } from "@paypal/react-paypal-js";

export default function App() {
    return (
        <PayPalScriptProvider options={{ "client-id": "test" }}>
            <PayPalButtons style={{ layout: "horizontal" }} />

When testing, the page freezes, and the console says:

Uncaught Error: Attempted to load sdk version 5.0.263 on page, but window.paypal at version undefined already loaded.

To load this sdk alongside the existing version, please specify a different namespace in the script tag, e.g. <script src="https://www.paypal.com/sdk/js?client-id=CLIENT_ID" data-namespace="paypal_sdk"></script>, then use the paypal_sdk namespace in place of paypal in your code.
Error: Unable to render <PayPalButtons /> because window.paypal.Buttons is undefined.

How is this possible? I checked multiple times that there is no script tag including the SDK already.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum