Detect direct instances in JavaScript

A couple of years ago, I wanted figure how to create a type check for class A that returns true only for objects instantiated by new A(). For this, I wrote the class like this:

class A {
  static #instances = new WeakSet();

  static isInstance (value) {
    return A.#instances.has(value);
  }

  constructor () {
    if (new.target === A) {
      A.#instances.add(this);
    }
  }
}

Any instance of a class that extends A thus would return false when passed to A.isInstance. But, then I realized that this can be faked by using Reflect.construct(B, [], A). What I did, then, was create a proxy whose construct trap would only pass A as newTarget if it met some condition. I’ve been trying to recall what that condition was, but while experimenting to rediscover it, I’m beginning to think that my old solution might not’ve worked.

Is there some way to achieve my desired effect here?