A145 If it said "affected or detected" then yes, a Rakshasa's true form would not be revealed if True Seeing is used at 6th.
BUT, my MM only says "immune to spells of 6th or lower"; and therefore suggest his immunity would not come into play against such magics. Spells like True Seeing and Detect Magic do not affect, or really even interact, with their 'Targets' directly. Instead, they simply pierce/perceive the magics that are in use on a particular creature, and the normal rules apply.
Now if the Rakshasa manages to gain access to
Nondetection... then you're likely to never known his true natural form.
Unless, of course, he wants you to.