Format-ScriptFormatCodeIndentation stops working after release building. It's related to the following code:
$AST = [System.Management.Automation.Language.Parser]::ParseInput($ScriptText, [ref]$Tokens, [ref]$ParseError)
It will be change after build process is run:
$AST = [System.Management.Automation.Language.Parser]::ParseInput($ScriptText, [System.Management.Automation.PSReference]$Tokens, [System.Management.Automation.PSReference]$ParseError)
It seems types are expanded incorrectly because $Tokens variable will always be empty. If I change it back to [ref] everything works again.