If you're using Draft-2020-12, change this line.
additionalProperties: false
to unevaluatedProperties: false
allOf and additionaProperties don't really work well together with the way you are trying to use it.
If you just use a $ref without the allOf, does your generator create two classes?
{
"$ref": "#/$defs/PartialResource"
}