People sometimes may use "consider as" to mean "consider to be," but if that is the actual intended meaning, it's a mistake because the words themselves don't mean "consider to be" but actually mean the exact opposite.
"Consider as" actually means "consider like." When something is "like" something else, it is not that something else but is merely in some way similar to it. So, if you say, for example, "I consider you as a friend," maybe you mean to call me a friend, but you're actually calling me something similar to a friend, meaning I am NOT a friend. I am merely as a friend, like a friend, similar to a friend, thus not a friend.
"Consider as" is fine phrasing if what you mean is "consider like" or "consider similar to," and maybe you do! The use of "consider as" over "consider to be" in situations can be a Freudian slip, meaning that one is betraying that one either consciously or unconsciously doesn't actually consider that something to be that something else, or to borrow on the above example, you don't actually consider me to be "a friend" and your use of "as" is a conscious or unconscious way for you to avoid calling me "a friend" when the situation seems to be pushing you towards you calling me "a friend."
Therefore, if you mean "consider to be," you should say "consider to be" (e.g., I consider you to be a friend.) or even just "consider" (e.g., I consider you a friend.), but NOT "consider as." On the other hand, if you don't mean "consider to be" but mean "consider as," as in "consider like" or "consider similar to," then "consider as" (e.g., I consider you as a friend.) is a perfectly fine and grammatical way of expressing that.