A scar is not the same as your "skin," but as an area with so little melanin and other pigments that it will burn easily. Especially for a fresh scar, it is better to avoid the sun because it increases the risk of infection and delays healing.
The scar doesn't need to be in direct sunlight to be affected by the sun. However, UV rays can penetrate through the atmosphere and affect a human's skin, so exposure is possible even when it's not sunny outside. So one way to avoid the side effects of exposure would be by applying sunscreen before going out in the sun.