In 12-tone serializm, it doesn't really mater what you call a note the more important is that you maintain the integrity of the tone row which doesn't recognize enharmonic equivalents as different notes for the purpose of the town row. The letter/quality combination comes second to the enumeration of the notes in a row and utilizing the different transformations possible.
It's typical to pick either all sharps or all flats when making a tone row just for consistency, but it's not a requirement and you can switch back and forth as you please as long as you maintain the row. It's even more typical when thinking of the base row and all of its transformations to remove the letter names altogether and just work with numbers then apply the numbers to note names only when you put them on the staff.
To demonstrate why it makes more sense to view theses in numbers rather than letter names and why at the end of the day the exact letter names don't really matter. The following is the matrix for your examples where P0 is ex1 and I5 is ex2:
While you can figure out the relationships, the patterns may not immediately jump out at you. In comparison, this is the exact same matrix just using enumeration to represent the notes instead of letter names:
You can play with the matrix calculator here yourself.
In tonal music this concept is a lot different and you can read it here.