Write Order metafields using Customer account API

We have created an account UI extension for the write order metafield. See this document link - https://shopify.dev/docs/apps/build/customer-accounts/metafields?extension=react

We can write customers metafield using Customer Account API but when we try to write order metafield, we see the error of APP_NOT_AUTHORIZED. We have already included the write_orders, read_orders,

and read_all_orders scope in our app. We have used app-created namespace metafield.

You can see the error message -

Message: "Access to this namespace and key on Metafields for this resource type is not allowed."

Code: "APP_NOT_AUTHORIZED"

We have read order writes-metafield using Customer Account API documents. It clearly says “Possible to write order metafield using Customer Account API”. Then why it is not working on our side?

Limitations
Metafield writes are only supported on the Customer, Order, Company, and CompanyLocation objects. Metafield writes are available as of the 2024-07 version of the Customer Account API.

OUR REQUIREMENT - We want to fetch order additional details from the customer. So we will save additional details in orders metafields.

Customer Account API - shopify:customer-account/api/2024-07/graphql.json

HERE IS MY CODE

fetch("shopify:customer-account/api/2024-07/graphql.json", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        query: `mutation($metafields: [MetafieldsSetInput!]!) {
            metafieldsSet(metafields: $metafields) {
              userErrors {
                field
                message
                code
                elementIndex
              }
            }
          }`,
        variables: {
          metafields: [
            {
              key: "nickname",
              namespace: "$app:preferences",
              ownerId: orderId,
              value: 'test value from account'
            //  type: "multi_line_text_field"
            },
          ],
        },
      })
    })
    .then((response) => response.json())
    .then((res) => {
        console.log('SAVE JSON', res.data.metafieldsSet.userErrors[0]);
    })
    .catch((error) => {
        console.error("There was a problem with the fetch operation:", error);
    });

We have checked in graphQL namespace: $app:preferences, key: nickname order metafield definition is created.

We have also tried it using an unstable version.