Certainly not in your home composter. You need heat >~145F for extended periods, your typical home composter only hits those temps for a short period of time because of how small they are. I've seen anecdotal home experiments on those really loud Sun Chip bags that are supposed to be compostable and they last for 1-2 years in home composters.
I put a “compostable” plastic cup in my home composter once and watched it go round and round through the thing over and over again for years, still virginal in its plastic cup shape with everything else decaying around it into dirt
I have no way of knowing whether my composter was unable to achieve the right conditions or the claim was just a bunch of shit, but I know which is my feeling
The reviews I’ve seen on YouTube show it breaking down biodegradable plastic. So I guess it makes a difference which electric composter you buy.
If your city has curbside composting, I bet the straws would do just fine. And I’m sure they degrade better than petroleum plastics in the landfill. “Don’t make perfect the enemy of good.”