I recall playing a game at a babysitters' when I was a child, on either PlayStation 2 or GameCube. (She had both.) In the game, you started off playing as this girl who was either a machine or a hologram (I think; it was unclear). You're on a spaceship, I believe, which gets invaded by these aliens that the people onboard can't kill with their guns and weapons and whatnot, but you alone are capable of fighting them as a hologram. I believe it was a JRPG, I remember turn-based combat, and some rather jarring deaths of characters for ten-year-old me, with crew members being killed by the aliens.
This sounds like Xenosaga Episode I: Der Wille zur Macht. (Each episode is named after a work by Nietsche, and there are many more allusions to religion and philosophy.) It was released for the PlayStation 2 in 2002–3. The cover art shows the robot KOS-MOS, who was specially designed to fight the "Gnosis" (monsters are invulnerable to normal weapons and kill humans on touch).
After a brief tutorial segment, the Gnosis invade the ship that KOS-MOS and her creator Shion are located on, and they have to fight their way out. There were some rather disturbing deaths in this part of the game, as well as later.
Xenosaga Episode I takes place in a universe based around science fiction. In the year "20XX", the Zohar—an artifact dating from the beginning of the universe which connects to the realm of a god-like energy dubbed U-DO—was unearthed by an archeological expedition in Kenya; the Zohar is key to enabling humanity to travel in space beyond the Solar System. Over 4000 years in the future, humanity has left Earth behind to colonize the galaxy following a terrible event, resulting in Earth's location being lost and the planet being dubbed "Lost Jerusalem": by the game's events, humanity has adopted a new calendar system dubbed "Transcend Christ" (T.C.), with the game's events taking place in T.C. 4767—equivalent to A.D. 7277. Humanity is now spread across 500,000 planets, with their governments forming the Galaxy Federation. Planets are connected through a time warp travel network called the Unus Mundus Network (U.M.N.). The U.M.N. is managed by Vector Industries, which also controls interests in the Federations military. Existing alongside humans are Realians, synthetic humans who hold equal status with natural humans. The Federation has come under attack from the ancient alien Gnosis, which begin decimating Federation worlds. As normal weapons are ineffective against them, Vector develops two different weapon systems designed to fight them: humanoid mecha dubbed A.G.W.S. (Anti Gnosis Weapon System), and the similar but more powerful KOS-MOS battle androids. Another hostile faction is the U-TIC Organization, a once-scientific group that now wishes to gain control of the Zohar. A key episode in the game's backstory is the Miltian Conflict, a war between U-TIC and the Federation which triggered the Gnosis' arrival and caused Miltia to be swallowed in a space-time anomaly.
Many of the playable characters in the game are almost human, but not quite—genetically modified, artificially constructed, reanimated after death with robot modifications, etc.
This was likely Xenosaga Episode I, which came out on the Playstation 2 in 2002.
The opening of the game features an alien attack on a spaceship. The aliens are called the Gnosis, and are completely intangible, phasing right through walls and bulkheads, ignoring regular weapons, and yet still completely able to kill. The main characters are a scientist named Shion, and a prototype android - in anime tradition, looking like a young girl (pictured below) - named KOS-MOS that can force the Gnosis to completely solidify so they can be fought.