Try This one on your functions.php
or main Plugin file
add_filter('register_block_type_args', function ($settings, $name) {
if ($name == 'demo/content-with-sidebar') {
$settings['render_callback'] = 'demo_blocks_content_with_sidebar';
}
return $settings;
}, null, 2);
replace your block name with demo/content-with-sidebar
here demo is the block name space.