In general relativity, there is no gravitational force. Gravity is geometry.
It’s similar for the clocks in the spaceship. The signal that the group at the front receives is “Doppler-shifted” to stretched waves because these scientists are moving away. Their detector counts fewer of these stretched waves per second, and the scientists conclude that the clock in the back of the ship runs more slowly than the clock at the front.
To confirm, the group of scientists at the back of the ship detects the light from the front clock. Because this group is accelerating toward the place where the signal was emitted, they detect a compressed wave, and their detector counts more of these waves per second. For them, the clock at the front runs faster than theirs. The two groups are in agreement about the clocks