The custom post types that can be queried must be explicitly configured. This can be done in 2 places.
In the Schema Configuration applied to the endpoint, by selecting option
"Use custom configuration" under "Customize configuration, or use default from Settings?" and then selecting the desired items:
Or, if selecting option
"Use configuration from Settings", the value defined under section "Included custom post types" in the Settings page for
Schema Custom Posts is used: