Whenever you issue a REST API GET request to retrieve a single feature/epic (using the id path param), the custom fields information is returned according to the API 2.0 Custom Field Supportdocumentation
However, if you are retrieving the features/epics using a query parameter (id or filter) you do not get the customFields information returned but get Null instead for the exact same feature.
Output for the customer fields is the same if you filter of not features/epics
Output for the customer field is different if you filter of not features/epics
Currently, there is no known workaround for this behavior. A workaround will be added here when available