Short answer: because D#m is in a different key. C#m may or may not be depending on the context.
Understanding the caveats of "rules are meant to be broken," "if it sounds good, play it," etc. my answer will be based on a fairly strict implementation of music theory so we can all attempt to keep our sanity.
Before we go on, I'd also like to take a moment to note that given the traditional construction of keys, sharps are added in the following order: F, C, G, D, A, E, B (You can see this demonstrated in the circle of fifths).
Below is the melody paired with chords. You didn't include where the chords land, so correct me if I'm wrong.
There are a few things going on here. Let's start by looking at the first six measures. The notes played are F#, A, B, C#, D. Assuming modes of the major scale, since the G is not played, there are two possibilities for scales starting on F# if we disregard the chords for now (you'll see why below):
- F# Phrygian: F#, G, A, B, C#, D, E, F# (this is a mode of the D Major scale)
- F# Aeolian (aka F# minor): F#, G#, A, B, C#, D, E, F# (this is a mode of the A Major scale)
But what is we regard all eight measures, view the D natural as a passing tone, and decide the D# is the real note of the mode? That gives us a third mode:
- F# Dorian: F#, G#, A, B, C#, D#, E, F# (this is a mode of the E Major scale)
But what if we also regard the A natural as a passing tone? That gives us the final mode we'll be looking at:
- F# Mixolydian: F#, G#, A#, B, C#, D#, E, F# (this is a mode of the B Major scale)
The way triads are constructed from a diatonic scale is by starting at a note and going up by thirds in that scale (essentially playing every other note). So we have the resulting chords for the following modes:
- F# Phrygian: F#m, G, A, Bm, C#dim, D, Em
- F# Aeolian: F#m, G#dim, A, Bm, C#m, D, E
- F# Dorian: F#m, G#m, A, B, C#m, D#dim, E
- F# Mixolydian: F#, G#m, A#dim, B, C#m, D#m, E
Ok, now let's go back and pay attention to the chords:
- We can see that F# Phrygian will not work for the first six measures, because the G natural will clash with the G# in the E major chord in the accompaniment.
- The notes in F# Aeolian will work with all the notes in the first six measures, and so do the chords. Unfortunately once we get to the D#m, we realize we don't have a D# note in the scale, much less a D#m chord!
- The notes in F# Dorian will work with all the notes in the first eight measures (assuming D natural as a passing tone). But again, once we get to the D#m, we realize the A natural in the scale will clash against the A# in the D#m chord.
- F# Mixolydian won't work because the A# will clash against the A natural in the F#m chord in the accompaniment.
From all this, we can conclude that D#m will not fit in any scale that also fits the other three chords.
Lastly, I'll point out a few things:
When you mention playing "F#m with a raised 6," congratulations! You discovered the Dorian scale! (I'm writing this snarkily, but that truly is a good insight.)
And, given we we've learned, you could play F# Dorian over the first four measures and F# Mixolydian over the last four measures (C#m and D#m).
Caveat: I've written this post keeping the same root (F#) to keep a basic point of reference. In reality, you might want to think about it as playing F# Dorian over the first two chords, and C# Dorian or D# Phrygian (both the same notes as F# Mixolydian, just starting in a different place) when resolving phrases. Phrasing and the resolution thereof is a bit beyond the scope of this answer, but it's something to keep in mind.