The only way you get a split with a flush is if the board has a flush and noone has a higher suited card in their hand.
If I read your example correctly:
Player A:
![]()
Player B:
![]()
Board:
![]()
![]()
![]()
![]()
Then player A's hand is
![]()
![]()
![]()
![]()
And Player B's hand is
![]()
![]()
![]()
![]()
Player A will win it because he has the higher (better) flush.
You MUST play the best 5 cards you can.