Depending on the protein you are cooking, and how it's sliced.
You could try to fry your aromatics and onions in a fairly generous amount of oil. Remove them and then fry your chicken in the now flavoured oil.
Then mix them all together or alternatively make a sauce with the oil in the pan.
If you must have darkly cooked, carmelized onions, cook them first. Then remove them and cook you chicken breast and add them back just before serving.