Amazon is investing an additional $4 billion in the artificial intelligence startup Anthropic as major technology companies rush to fund generative AI.