There is a related thread in Cuba.Platform. The solution in Cuba.Platform creates the same issue in Jmix. The link is below.
Removing the following content solved my problem.
// if (metaProperty.getRange().isClass()) {
// if (Entity.class.isAssignableFrom(metaProperty.getJavaType())) {
// MetaClass _metaClass = metadata.getClass(metaProperty.getJavaType());
// MetaProperty primaryKeyProperty = metadataTools.getPrimaryKeyProperty(_metaClass);
// String pkName = primaryKeyProperty.getName();
// propertyName += "." + pkName;
// propertyPath = metaClass.getPropertyPath(propertyName);
// if (propertyPath == null) {
// throw new RestFilterParseException("Property " + propertyName + " for " + metaClass.getName() + " not found");
// }
// metaProperty = propertyPath.getMetaProperty();
// }
// }
Framework : Jmix 1.5.1