Apple has been more disciplined with AI investments, while Microsoft is going all in.