Obviously you guys can speak a bit better as to what's correct, but I'm not entirely positive that's a totally correct fix either.
TEST5, TEST4 and TEST3 are presumably 3 separate users (not 1 user with a long name). TEST5 normally being the first one in the list (in LTR). With inheriting the direction of the parent/page, that doesn't actually enforce isolation between individual names in the list, hence you see it written as "TEST5, TEST4, TEST3" despite these being separate people. If I'm correct, it should be closer to "TEST3, TEST4, TEST5".
Depending on how neutral and LTR characters are mixed here, you may get that semi-common weird order too.
It seems to me that the correct fix is to enforce independent directionality/isolation on a per name basis. I've done this now by removing the dir=auto on the wrapping element and applying <bdi> tags to the individual names that will be rendered within the phrase. This should keep the overriding phrase directionality and ensure that each name is isolated from each other. (In a browser that supports it -- Chrome or Firefox.)
Sorry for not been a bit clear due the language differences. I made some picture to explain the issue in a clearer way (Hope so...).
As you can see here after I apply my own fix css code "Not sure if its the proper way or not"
And this one is before applyin the fix css code. (phrase flipped arownd, acting like LTR)
Here is another test before applying the fix css code. (When the 1st word is in Arabic, the phrase sequence is fine, but when that 1st word is in English it flipps it and act like and English phrase LTR)