I don't think either role is particularly an issue although Philadelphia has additional considerations - it's not just a film with a character who happens to be gay, I can see the argument that a gay actor should play a role with that sort of significance (AIDS in the 80's etc).
Forrest Gump hmmmm I don't actually think there's any massive issue with it; I don't think it's an offensive film and I think he plays the role sensitively. It's not making fun of intellectual disability in any way

. It's not Adam Sandler in "The Water Boy" or Knoxville in "The Ringer"