Query in YII 2 getting result different from Where clause

I am performing a query, where it contains a where clause where the Status flag is to be applied during execution.

But the result always comes, ignoring my clause.

    Veiculo::find()->select([Veiculo::tableName() . '.id', "CONCAT(descricao, ' - ', placa) AS text"])
            ->innerJoin(ModeloVeiculo::tableName(), ModeloVeiculo::tableName() . '.id = ' . Veiculo::tableName() . '.fk_modelo_veiculo')
            ->where(['!=',Veiculo::tableName() . '.status' ,  4]) 
            ->andWhere(['like', 'placa', $q])
            ->orWhere(['like', 'descricao', $q])->funcaoFilter()->asArray()->all();


-> where ([’! =’, Veiculo: tableName (). ‘.status’, 4]) // Flag to filter vehicles with status other than type 4

Dump resulting SQL with ->createCommand()->sql and see/post what’s there.

andWhere and orWhere will add a specified condition to the already existing one. And you should note that AND and OR will be applied between the existing condition as a whole and a newly added one.
So, in your case, the condition will be constructed like the following:

1) veiculo.status != 4
2) (veiculo.status != 4) AND place like $q
3) ((veiculo.status != 4) AND place like $q) OR descricao like $q

The condition finally you get is not what you want, is it?

Probably you may want to do this:

        ['!=', Veiculo::tableName() . 'status', 4],
            ['like', 'placa', $q],
            ['like', 'descricao', $q],