I don't know the details but it's not quite the same 'connect'But I think you can simply have two venvs if you want - one with Connect and one with local pyspark. You probably do want to treat these as distinct environments; they are different enviro...
Databricks-Connect is by design a drop-in replacement for pyspark, essentially. It transparently takes over execution of the Spark parts without change to the program, and is definitely a different 'environment' from local pyspark.
As with any situat...
Looks like you are comparing to strings like "1", not values like 1 in your filter condition. It's hard to say, there are some details missing like the rest of the code and the DF schema, and what output you are observing.