Using different toolchain versions

Usually you install platforms like that, not packages… In any case, packages installed like this will not take effect globally. The platform will dictate the package and version to use.

The override is the per-project option platform_packages.

So you must rather do

; override compiler
platform_packages = 
   toolchain-atmelavr@file://c:/ti-software/platformio/avr-gcc-10

in the platformio.ini.

Note that the toolchain folder must also contain a package.json, analog to C:\Users\<user>\.platformio\packages\toolchain-atmelavr\package.json, preferably with the correctly updated version info.

More technical details about packages are discussed in here.