I think, both sentences are possible, but one is in active voice and the other in passive voice. See the word “can” and “can be”. Can be is the passive voice of can.
Maybe the following sentences make it clearer:
I cannot compare with you.
You cannot be compared by me
Student or Learner