In General everything is decided, everything is eerily clear, the handler does not return anything, here came the void T_T. As always the solution under the nose.
Added to the handler before wp_die():
$buildings = get_posts( $args ); foreach( $buildings as $post ){ setup_postdata($post); ?> \r\r
; echo $image_url[0] ?>)
\r
\r
<?php echo $post->price; ?> ₽
\r
\r<?php\rif ($post->room == 'Studio') { echo ($post->room . ', ' . $post->space . ' m2'); }else{ echo ($post->room . 'bedroom apartment' . $post->space . ' m2'); } ?>
\r<?php echo ($post->district . '
str ' . $post->city . 'the house' . $post->house); ?>
\r
Go\r\r\r<?php\rthe_post();\r}\rwp_reset_postdata();</code>