The second parameter for get_page_by_title()
is $output
, with the third being $post_type
.
This should solve your porblem –
$patchwork = get_page_by_title( 'Patchwork 01', OBJECT, 'patchwork' );
echo $patchwork->ID;
Please have a look at the Function Reference for get_page_by_title()
for more information.