I have an 11-speed 11-34 cassette on my road bike, which has Di2 and shifts flawlessly. Every time.
Using my bike to my Wahoo Kickr which comes with a Shimano 105 11-speed cassette but it is 11-28, and my shifting is a little off sometimes on it.
Should there be any issue with indexing because of the different cassettes despite being the same speed? (both chain and cassette are also new on my bike, btw)
Fairly normal issue for wheel off trainers. Easy to adjust with barrel, more annoying with Di2 just due to the added PITA of electronics and not a quick spin.
Sorry, you are not changing cassettes, rather you’re installing your bike on the trainer. There shouldn’t be any differences in shifting in that case. You may want to adjust the b-limit screw, but other than that should line up the same.
Manufacturing tolerances and final location of the cassette on any wheel or trainer can and will vary small amounts. Due to the finite nature and narrow adjustment range on higher cog count cassettes (like 11 & 12 speeds), there is more tendency for those small tolerance differences to give functional issues on one device or another.
As such, adjusting the barrel tension on the rear derailleur is super common. Same for Di2 with the process being a tad different. But again, mismatch between a wheel and wheel-off trainer is quite common. I have to tweak most of the bikes and trainers I use at least a bit each time I install or remove them.
Make a note about any adjustment you make to work on the trainer. You will want to reverse that adjustment if/when you pull the bike off the trainer and install a wheel again.