Keep in mind, autobuy is an extremely basic feature. It doesn't really have any complexity in it.
Yes, it (technically) changes based on game mode
However, it isn't intelligent enough to make it's own decisions based on game mode. If you open the shop, you'll see the item builds listed for the various modes, including whatever custom builds you have created using the god builder. Since not all items are available in every mode, then autobuy has to at least skip some items not available in whatever mode you happen to be playing in. For instance, Doom Orb is not available in Assault, so autobuy will be unable to purchase it for you.
No, autobuy is not reactive to game circumstances
The autobuy feature is really basic and, in a word, dumb. It is not aware of your team makeup, your opponents, if you're ahead, if you're behind, or anything else. It is vaguely aware of how much gold you have, but only for the purpose of spending as much of it as it can.
This is why most players end up avoid using autobuy once they become more familiar with the game and the various scenarios. That way, you can customize your god's item build based on the particular in-game circumstances. If you're ahead of the opponent team, you might be more prone to buy items that allow you to be more aggressive. If the other team tends to heavily favor magical damage, you can focus your main defensive items towards magical protection. If the enemy team has a lot of crowd control available, you might favor items that reduce/remove/prevent crowd control. Autobuy is completely incapable of making these decisions.