Yes, once it's committed, it's committed. That's really the point of commit.
If you need to do this, then you're doing the rollback at the business level (which is a valid use case). You would need to write the inverse Cypher in its own transaction to undo the first commit. I.e. Delete the relationship and the two nodes you created in the first transaction.
Have a look at this article https://en.wikipedia.org/wiki/ACID which should help you understand the principles of how transactions in an ACID database, like Neo4j, work.