From: Washington, D.C.
Based on Zahar00's save, it looks like the issue is that the CBU-103's are considered stand-off weapons, and the A/G Gun doctrine excepts aircraft with stand-off weapons. With that loadout you will need to manually order an attack then manually order RTB.
For non-standoff loadouts (Mk82, Mk84, etc), if you set "A/G Strafing (gun)" to "Yes" and "Weapon State, Pre-Planned" to "Winchester", the aircraft will do exactly what you want. They will attack using their primary weapons, then strafe until they are out of gun ammunition, then RTB automatically.