Invalid Quadratic Form: multiplication of a binary variable and continuous variable

we are solving the if-else condition problem with introducing binary variables but it creates another problem as invalid quadratic form(s): not a square, which occurs by multiplication of binary and continuous variables how can I solve this problem?

When you introduce binary variables for logical constraint modeling, you should not multiply binary variables with continuous variables. The whole idea is not to do that.

See the first part of section 2.8 of to see how to rewrite the product of a binary with a continuous variable.