Active Filter and Sine to Square Conversion Issues
If your op amp output in real life looks how it does in the Sim then I would bet that you are violating at least the single ended input voltage range of the comparator, if not the input common mode range as well.  Your comparator negative supply voltage is 0V.