The $post
you’re working with is a WP_Post Object and you must interact with it as so.
$post->post_status="draft";
It’s usually not a good practice to modify the $post
object directly so it’s something you may want to avoid. A better way may be to simply pass an array of values to wp_update_post()
function like so:
wp_update_post( array(
'ID' => $post->ID,
'post_status' => 'draft',
) );