If you lose XP for things like Raise Dead, it will cost you your last level's worth of XP.
Let's say you had 9,000 XP before you died and got raised. That's 4th level. The last level was 3rd, and to get from 3rd to 4th takes 3,000 XP, so, you would start with 9,000 - 3,000 = 6,000 XP. That's also 4th level in this case.
If you had only had 8,000 XP before you died and got raised, however, you would now be at 5,000XP, which is only 3rd level. So, you would have to de-level your character sheet.
NOTE: Some playable races/subraces have a Level Adjustment. Paying off a Level Adjustment reduces your total XP. If you then die, get raised, and drop to a lower level from the subsequent XP loss, you do NOT gain your Level Adjustment back. Once it's paid off, it's gone for good.