Thank you Jorge for your insight!
I just want to add that this issue is still applicable to the current version of Azure AD Connect 2.1.16.0.
Just to clarify, there are two options as per my observation:
1- Direct flow from CN attribute.
With this option, the exact same AD computer name will show in AAD. But DRS use dNSHostName attribute. That said, displayname could be overwritten at some point by DRS causing inconsistent name for computer objects with more than 15 characters or computer object that doesn't have value under dNSHostName.
For this option, just use [CN] as transformation rule.
2- Only use the value of dNSHostName attribute.
Whether displayname in AAD is updated by DRS or AADC, it will always reflect the value of dNSHostName AD attribute. If AD computer name is longer than 15characters, it would have dNSHostName AD attribute longer than actual computer name in AD ( CN attribute). However, AAD will get the value under dNSHostName only in consistent way.
AADC transformation rule would be, as clarified by Jorge: UCase(Left([dNSHostName],InStr([dNSHostName],".") - 1))