Search for low-mass resonances decaying into two jets and produced in association with a photon using pp collisions at $s=13$ TeV with the ATLAS detector