It seems you are using a card or a contact reader that only supports T=0, using an implementation of javax.smartcardio that doesn't support extended length over T=0.
In your first example, you ask to connect in any protocol, and the card and the reader have agreed on T=0. Upon sending your extended C-APDU, the implementation fails because it does not support sending extended APDU over T=0.
In your second example, you force usage of T=1, however either the card or the reader doesn't support T=0.
Have you checked your reader doesn't have known bugs? https://ccid.apdu.fr/ccid/section.html
Have you checked the card ATR to see if it is configured for dual T=1/T=0? https://smartcard-atr.apdu.fr/
Does your card have a contactless interface? If you have a contactless reader, extended length is nearly always supported by those readers.