는 is an emphasizer which cannot be omitted from the idiomatic phrase -아서는/어서는/여서는 안 되다 (Note: The standard dictionary does not have it in an idiom list, but I believe that it is an idiom). Some idioms (including -아서는/어서는/여서는 안 되다) are fixed, and they are not fully relevant to their components. Anyway, 되다 is the "core" word in this phrase; it governs the meaning of the whole phrase. This is why your approach is not working for that sentence.
Although -는 것은 안 되다 is also grammatically correct, most Koreans use -아서는/어서는/여서는 안 되다 for that specific meaning of 되다 ("not to be allowed"). The point is that you should consider collocation.
The phrase -아서는/어서는/여서는 안 되다 is quite equivalent to another idiomatic phrase: -아서/어서/여서 되겠-? Please note that the latter is used to form a rhetorical question and also that the emphasizer 는 is hardly attached to -아서/어서/여서 in the latter. The question
우리와 다른 사람을 차별해서 되겠니?
does not expect an answer, although you can still answer it (for example, "(물론) (차별해서는) 안 되지"). As "우리와 다른 사람을 차별해서는 안 된다" does, this question says what you should / must not do.