First question - are you using LED bulbs for your front signals or side markers? If so, that is likely the problem due to the nature of LEDs being polarity-sensitive (you have to connect the + to one specific wire.) Incandescent bulbs are not polarity-sensitive. You can connect the positive to either wire. However, that's the simple answer. As
@Woodrow and I discovered recently, some of the LED bulbs on the market have built-in circuitry that mimics an incandescent bulb. Unfortunately, the manufacturers don't provide any of this information. If you are using an LED, and it doesn't mimic an incandescent bulb, this is likely your problem. The common fix for this situation is to add diodes to the harness. There are several threads on here that discuss that.
That's the simple explanation of LEDs for side markers. Here's a more detailed explanation:
The side markers use what's commonly referred to as a floating ground, which is not very descriptive. With the parking/running lights on, but turn signal not blinking on, the ground comes through the turn signal filament in the front signal light to Pin 2 on the side marker as a voltage divider. The side marker light sees less than 12V on Pin 2 and 12 V on Pin 1, which is enough to light it, but dimmer than normal.
With the parking/running lights on and turn signal blinking on, the turn signal wire brings Pin 2 up to 12V, matching Pin 1's 12V from the headlamp switch output, and since the side marker filament sees 12V on each pin, the result is no voltage across it, so it doesn't light up. This gives the appearance of a blinking light, but out of phase with the front turn signal.
With the headlights off, and turn signal blinking on, Pin 1 now gets ground through the parking light filament in the front signal light as a voltage divider and Pin 2 sees 12V, so it lights up dimly. Then, when the turn signal blinks off, both pins see 0V, so the marker light turns off. So, it blinks between 0V and something between 0V and 12V, but this time it's in phase with the front signal.
Realizing how confusing this is, here's a chart I just made showing the status of the switches and lights:
View attachment 704901
Please, if someone sees an error here, let me know so that I can correct it.
Now, if you aren't using LED marker lights, based on the description of the problem you gave, I can't see a situation where it would behave exactly as you've described. For the side marker to work whenever the turn signal is blinking on, but not when the turn signal is off, there would have to be a wiring problem with the front turn signal because Pin 2 gets ground through the front signal's turn filament, or that filament in the bulb would have to be broken. Either way, that front signal wouldn't work.
So, let's start with this: LEDs or incandescent?