Why test case 2 is wrong

#include
#include
using namespace std;
struct node{
int data;
node* left;
node* right;
};
int sum=0;
node* buildbst(node *root){
int d;
cin>>d;
if(root==NULL){
root =new node;
root->data=d;
root->left=NULL;
root->right=NULL;
}
string str1,str2;
cin>>str1;
if(str1==“true”){
root->left=buildbst(root->left);
cin>>str2;
if(str2==“true”){
root->right=buildbst(root->right);
}
else{
root->left=NULL;
root->right=NULL;
}

}
else{
cin>>str2;
if(str2==“true”){
root->right=buildbst(root->right);
}
else{
root->left=NULL;
root->right=NULL;
}

}
return root;
}
void levelsum(node *root,int i,int k){
if(root==NULL){
return;
}
if(i==k){
sum=sum+root->data;
}
levelsum(root->left,i+1,k);
levelsum(root->right,i+1,k);
}

int height(node* root){
if(root==NULL){
return 0;
}
return 1+max(height(root->left),height(root->right));
}
int issymetrical(node root){
if(root==NULL){
return 1;
}
else if(abs(height(root->left)-height(root->right))<2){
return 1;
}
else{
return 0;
}
return issymetrical(root->left)&&issymetrical(root->right);
}
int main() {
node
root=NULL;
root= buildbst(root);
int p=issymetrical(root);
if(p==1){
cout<<“true”;
}
else{
cout<<“false”;
}
return 0;
}

Use this function in the code as,
bool isBalanced(node *root)
{
if(root==NULL)
{
return true;
}
int lh,rh;
lh=height(root->left);
rh=height(root->right);
if(abs(lh-rh)<=1 && isBalanced(root->left) && isBalanced(root->right))
{
return true;
}
return false;
}