Maybe this will help someone:
remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );
The above lines of code provided by my theme developer in theme functions.php with the lines provided by AITpro allowed to completely remove the rest api from the header.