Have a try with these four marked fixes to your code (but think there also are other issues in other parts of the project):
Sub show_inventory()
Dim sh As Worksheet '<= changed was: Workbook
Set sh = ThisWorkbook.Sheets("Inventory")
sh.Cells.Clear '<= changed was: sh Cells.Clear
ThisWorkbook.Sheets("Product_master").Range("B:B").Copy sh.Range("A1")
sh.Range("B1").Value = "Purchase"
sh.Range("C1").Value = "Sale"
sh.Range("D1").Value = "Available Stock"
sh.Range("E1").Value = "Stock Value"
Dim lr As Long
lr = sh.Range("A" & sh.Rows.Count).End(xlUp).Row '<= changed
'was: lr = Application.WorksheetFunction(sh.Range("A:A"))
If lr > 1 Then
sh.Range("B2").Value = "=SUMIFS(SALE_PURCHASE!D:D,SALE_PURCHASE!B:B,INVENTORY!A2,SALE_PURCHASE!C:C,""PURCHASE"")"
sh.Range("C2").Value = "=SUMIFS(SALE_PURCHASE!D:D,SALE_PURCHASE!B:B,INVENTORY!A2,SALE_PURCHASE!C:C,""SALE"")"
sh.Range("D2").Value = "B2-C2"
sh.Range("E2").Value = "=VLOOKUP(A2,PRODUCT_MASTER!B:C,2,0)*D2"
If lr > 2 Then
sh.Range("B2:E" & lr).FillDown
sh.Calculate
End If
sh.UsedRange.Copy
sh.UsedRange.PasteSpecial xlPasteValues
Dim inv_Display As Worksheet
Set inv_Display = ThisWorkbook.Sheets("Inventory_Display")
inv_Display.Cells.Clear
If Me.Txt_Search.Value <> "" Then
sh.UsedRange.AutoFilter 1, "*" & Me.Txt_Search.Value & "*"
End If
sh.UsedRange.Copy inv_Display.Range("A1")
'''''''''''Show Data'''''''
lr = inv_Display.Range("A" & inv_Display.Rows.Count).End(xlUp).Row '<= changed
'was: lr = Application.WorksheetFunction(inv_Display.Range("A:A"))
If lr = 1 Then lr = 2
With Me.ListBox1
.ColumnCount = 5
.ColumnHeads = True
.ColumnWidths = "150,0,0,80,0"
.RowSource = inv_Display.Name & "!A2:E" & lr
End With
End If
End Sub