You’re experiencing a “feature” of Visual Studio that auto-formats code on certain actions (completed statement on ;, completed block on }, or on Paste. Fortunately, these preferences can be changed via the following settings page (they are language-specific):
VS 2015
Tools > Options > Text Editor > C# > Formatting
Then temporarily uncheck the Automatically format on paste option.
VS 2017/2019
In Visual Studio 2017 and 2019, the “Formatting” options moved underneath a new “Code Style” menu and added some extra settings: