Actually, it seems that my previous solution with "hideNotes" and rests leads to collisions as well, and it also shifts down any dynamic markings below the staff, which is not a desirable effect. I'm grateful for any suggestions on how to solve the problem.
Again, the issue is that using textLengthOn works well with score, but in the individual parts either the short notes get stretched weirdly (if I use textLengthOn with those) or markups above long notes are positioned on top of each other (if I don't use textLengthOn with those, or sometimes even if I do). Currently, the only option I can think of is creating a customized "hideNotes" solution for each part separately, to avoid collisions, but this seems like a lot of work. Ideally I'd like the solution to work for all parts and the score at once. Erika