You will see here that the last eighth note/quaver of the fourth beat forms consecutive 5ths between soprano and alto. Would something like this be wrong in four-part writing or is the fact that the perfect 5th falls on a weak beat enough to mitigate the sound of consecutive parallels?
I think you should re-examine this through a harmonic reduction, fix the fundamental voice leading problems, and then work out the melodic embellishment details as rhythm first, specific pitch second.
You have this...
Which of the following is the intended harmonic reduction, both have various issues regarding parallel and direct perfect intervals?
The problem is there are too many bass notes harmonized with P5's in the soprano, and your specific melodic figuration exacerbates the problem.
One way to deal with the situation is to "flip" the role of either the bass or soprano so that whatever is a troublesome perfect interval becomes a problem free imperfect third or sixth.
Changes to soprano to harmonize in thirds...
Changes to bass to harmonize in sixths...
There are some changes to the middle voices, but after the bass and soprano are fixed, filling in the middle voices should be simple.
I tried to preserve you top line of
C#5 D#5 E5.
I think a good rule of thumb is whenever the soprano harmonizes the bass with a perfect fifth make sure the next chord is inverted. Or, you could say alternate root position chords with chords of the sixth.
If you do use consecutive root position chords, make sure they have the soprano harmonizing a third on top, or the top voices moving in contrary motion relative to the bass.