If a transaction is recognized as a double spending transaction -> TX is not valid.
That depends on what code the miner who submits a block has.
Most likely most miners do not allow a double spend attempt, basically being defined as sending another tx from the same coin balance; but there may be a small % of miners who may allow the second tx to be valid, so if one comes in around the time one of those miners submits a block, it could in theory occur.
I meant a double spending of an already confirmed transaction, not a
double spend attempt on an
unconfirmed transaction. I should have made this more clear.
A double spending of an already confirmed transaction won't be included by any miner (or else they would simply lose the block reward because the block won't be accepted as a valid one from the network).
However, a double spending of an unconfirmed transaction can definitely happen (and especially if the RBF-flag is set. A RBF-transaction basically is a double spending transaction with an increased fee).