If you have the image field to return an image array then the_sub_field('project_image');
may not output anything. Try print_r(get_sub_field('project_image'));
And you’re correct, you don’t need the ->ID
part if you’re returning the ID for the post object field.